chi-teck / commander
This package is abandoned and no longer maintained.
No replacement package was suggested.
Simple and fast CLI tool for Drupal
dev-master
2019-07-30 18:26 UTC
Requires
- php: >=7.1.0
- ext-json: *
- drupal/core: ^8.7.0
- symfony/console: ^3.4.0
- symfony/dependency-injection: ^3.4.0
- symfony/http-foundation: ~3.4.0
- webflo/drupal-finder: ^1.1.0
This package is auto-updated.
Last update: 2022-03-05 15:37:33 UTC
README
A simple CLI tool for Drupal.
Installation
composer require chi-teck/commander
Usage
vendor/bin/commander
Command Authoring
- Create a command according to symfony/console documentation.
- Optionally, implement
Commander/DrupalAwareInterface
to indicate that the command needs fully bootstrapped Drupal installation. - Register the command in composer.json.
"extra": {
"commands": ["Foo\\Command\\BarCommand"]
}
Command discovery is performed for all packages in vendor directory, enabled modules and themes.
Dependencies can be injected via factory create
method. For modules it is possible to register a command as service like follows.
services:
Drupal\foo\Command\BarCommand:
arguments: ['@entity_type.manager']
Links
#2242947: Integrate Symfony Console component to natively support command line operations
License
GNU General Public License, version 2 or later.