Thi CLI project skeleton tempts to require the least amount of code needed to write a command line interface project based on Symfony Console.
The folder structure follow a simple Domain Driven Design application structure by suggesting splitting Application, Domain, UserInterface, and Infrastructure responsibilities.
The minimum of features that is needed for developing CLI applications is included:
/src
Command
implementations directly to the CLI console applicationRunning PHPUnit test suites is possible by running composer run tests
. The /tests
folder gets auto-registered by
composer, and follows the DDD application structure, but no actual tests are provided with the skeleton.
Registering a command to the CLI application is the only autoconfiguration available in this skeleton, as can be found
in config/services.php
.
/src/UserInterface/Cli
) and let it extend SymfonyComponentConsoleCommandCommand
bin/console
, the command created became available>=8.0.2
with ext-mbstring
extension enabled