abenevaut/bedrock-console

This package is abandoned and no longer maintained. No replacement package was suggested.

Bedrock console cli.

dev-master 2020-11-10 23:40 UTC

This package is auto-updated.

Last update: 2022-04-11 02:49:53 UTC


README

Installation

CURRENTLY, THERE IS NO STABLE REVISION

composer require abenevaut/bedrock-console

Now you can execute the following command

vendor/bin/console

serve command

To use serve command, trigger installation process. The following command will create a server.php a your project root.

vendor/bin/console serve --install

Now you can use PHP built-in server for bedrock

vendor/bin/console serve
vendor/bin/console serve localhost
vendor/bin/console serve localhost 9000
vendor/bin/console serve -h

Add commands

  • Have a look on Symfony console documentation to create new commands.
    • All commands have to heritate from src/Command.php to use the container
  • Add composer psr-4 autoloading to load automatically your customs commands
  • Edit config/application.php then add a global array recording all you customs commands, like follow :
$commands = [
    \PSR4\NAMESPACE\MyCustomCommand::class,
];