Skip to content
Chi-teckPublic

About

A simple CLI tool for Drupal.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commander

A simple CLI tool for Drupal.

Installation

composer require chi-teck/commander

Usage

vendor/bin/commander

Command Authoring

  1. Create a command according to symfony/console documentation.
  2. Optionally, implement Commander/DrupalAwareInterface to indicate that the command needs fully bootstrapped Drupal installation.
  3. 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.

About

A simple CLI tool for Drupal.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages