-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Something like
$ php www/index.php kdyby:command-groups:export
will create runners in temp/ that will be added into projects composer.json into extra: bins and composer will then link them to vendor/bin.
The runners must get the commands by searching of tags on Container, so the command doesn't have to be run every time you add Command.
Every command will be in "default" group by default, that will be available from www/index.php. If you add it to another group, it will no longer be in "default" group, becase the "default" group will be added only when command has no groups. That means you could still add it to "default" group.
Then you could run them from there afterwards.
$ vendor/bin/app-crons emails:send
$ vendor/bin/doctrine orm:validate-schema
$ vendor/bin/utils user:create
$ vendor/bin/dangerous-commands-that-could-damage-database recalculate:credits
You should also be able to create your own runner and add some custom logic. Therefore there has to be a factory that will create the Console\Application object with commands from given group and you could then wrap it or whatever. This one needs a bit more thinking :)
Inspired by @VasekPurchart
Motivation: on the general runner you don't need to see crons and every single tool, you only need few basic commands like orm:validate etc. When you get over 20+ commands it get's confusing. This separation should make the usage and orientation easier.