Download the PHP package spryker/console without Composer
On this page you can find all versions of the php package spryker/console. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package console
Console Module
Console is a wrapper over Symfony's Console component, that makes the implementation and configuration of a console command easier. A console command is a php class that contains the implementation of a functionality that can get executed from the command line.
Installation
Documentation
Testing Console Commands
The Console module provides a ConsoleHelper to simplify testing console commands using Codeception.
Using ConsoleHelper
The ConsoleHelper wraps your console command in a CommandTester instance, which allows you to execute the command programmatically and inspect its output and exit code.
Basic Usage
Passing Arguments and Options
The execute() method accepts an array of input parameters where:
- Arguments are passed by name:
['argumentName' => 'value'] - Options are passed with the
--prefix:['--option-name' => 'value']
Execution Options
The execute() method accepts a second parameter for execution options:
Available execution options:
interactive: Sets the input interactive flagdecorated: Sets the output decorated flagverbosity: Sets the output verbosity levelcapture_stderr_separately: Make output of standard output and standard error separately available
Inspecting Command Output
After execution, you can inspect the command results:
Testing Exception Cases
Helper Configuration
Ensure the ConsoleHelper is configured in your codeception.yml:
All versions of console with dependencies
spryker/acl-entity-extension Version ^0.1.0 || ^0.2.0 || ^1.0.0
spryker/application Version ^3.37.0
spryker/application-extension Version ^1.0.0
spryker/config Version ^3.0.0
spryker/container Version ^1.4.0
spryker/error-handler Version ^2.0.0
spryker/kernel Version ^3.52.0