dev-master
9999999-devA Silex Service Provider for common console commands for Cache, Doctrine DBAL, and Assetic
Unlicense
The Requires
The Development Requires
silex service-provider
A Silex Service Provider for common console commands for Cache, Doctrine DBAL, and Assetic
A Silex Service Provider for common console commands for Cache, Doctrine DBAL, and Assetic, (*1)
Add the dependency to your composer.json, (*2)
"essgeebee/console-command-service-provider" : "dev-master"
Note that these files assume a particular project structure - see the templates/console file for more details, (*3)
Add to your composer.json, (*4)
"autoload": { "psr-0": { ... "Ten24": "vendor/essgeebee/console-command-service-provider/src/" } }, ... "scripts": { "post-install-cmd": [ "Ten24\\Composer\\ConsoleCommandInstaller::postInstallCmd" ], "post-update-cmd": [ "Ten24\\Composer\\ConsoleCommandInstaller::postUpdateCmd" ] }
Run, (*5)
composer run-script post-update-cmd
or, (*6)
composer run-script post-install-cmd
This will attempt to create the directories 'app' and 'src' at the root of your project if they don't exist, and copy templates/console and templates/console.php to app/ and src/, respectively., (*7)
From your terminal, you should now be able to run, (*8)
app/console
and get something to this effect:, (*9)
MyProject version 0.1 Usage: [options] command [arguments] Options: --help -h Display this help message. --quiet -q Do not output any message. --verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug --version -V Display this application version. --ansi Force ANSI output. --no-ansi Disable ANSI output. --no-interaction -n Do not ask any interactive question. Available commands: help Displays help for a command list Lists commands assetic assetic:dump Dumps all assets to the filesystem cache cache:clear Clears the cache doctrine doctrine:database:create Creates the configured databases doctrine:database:drop Drops the configured databases doctrine:schema:load Load schema doctrine:schema:show Output schema declaration
By default, the following commands are registered to the console: - doctrine:schema:show - doctrine:schema:load - doctrine:database:create - doctrine:database:drop - cache:clear - assetic:dump, (*10)
The Provider looks for its options within the $app['ten24.consolecommand.options']. Here's a list of the available options - all keys within $app['ten24.consolecommand.options']. Note that the required options do have a default value, that may not align to your project structure., (*11)
A Silex Service Provider for common console commands for Cache, Doctrine DBAL, and Assetic
Unlicense
silex service-provider