Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide annoted command support for Drush 8. #2139

Merged
merged 28 commits into from
May 7, 2016
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d14fce0
Provide annoted command support for Drush 8.
greg-1-anderson Apr 18, 2016
eb682b9
Fix up help output for annotated commands.
greg-1-anderson Apr 19, 2016
c1a2f63
Ensure that options are passed to the command.
greg-1-anderson Apr 20, 2016
e0157a4
Add tests for annotated commands.
greg-1-anderson Apr 20, 2016
fcb6887
Better handling and testing of help for annotation commands.
greg-1-anderson Apr 20, 2016
965da88
Cache annotated commandfile discovery results.
greg-1-anderson Apr 20, 2016
356fb75
Disable the woot module to avoid cross-contamination of the Drupal te…
greg-1-anderson Apr 20, 2016
55593fa
Be a little more robust about disappearing annotation command files.
greg-1-anderson Apr 20, 2016
7f9c69b
Support ignored-modules for annotated commands.
greg-1-anderson Apr 21, 2016
84af0d3
Extract consolidation/annotated-command classes out for backport, to …
greg-1-anderson Apr 22, 2016
8acb695
Annotated commands tests for Drupal 6.
greg-1-anderson Apr 22, 2016
dd66a85
Fix CommandInfo for php 5.4.
greg-1-anderson Apr 22, 2016
b06e66f
Add consolidation/output-formatters.
greg-1-anderson Apr 30, 2016
95d10cf
Use consolidation/output-formatters with annotated commands, and upda…
greg-1-anderson Apr 30, 2016
d85429a
Update to annotated comands 1.0.0-beta8, and add a test for backend r…
greg-1-anderson May 1, 2016
b0b8eed
Factor annotationcommand_adapter_get_commands_for_commandhandler out …
greg-1-anderson May 2, 2016
c8a940b
Use modules' services file to find commandfile instances.
greg-1-anderson May 2, 2016
7ff575b
Do a full bootstrap when running help, to ensure that the module serv…
greg-1-anderson May 3, 2016
d6efe71
Require a @command annotation for module service command methods, but…
greg-1-anderson May 3, 2016
4828b63
Do command discovery via tagged services rather than service parameters.
greg-1-anderson May 4, 2016
439c478
Support --ignored-modules in tagged services.
greg-1-anderson May 4, 2016
761299f
Check to see if DrupalKernel::addServiceModifier already exists; if s…
greg-1-anderson May 4, 2016
a70b79f
Update to consolidation/annotated-command 1.0.0-beta11.
greg-1-anderson May 6, 2016
ab0b099
Support symfony console commands. Note that we call Command::run() di…
greg-1-anderson May 6, 2016
535c840
Do not rebuild the container; it does not appear to be necessary, and…
greg-1-anderson May 6, 2016
bc03759
Get rid of unnecessary cleanup in annotated command test.
greg-1-anderson May 6, 2016
2690201
Add tests for Symfony Console commands and annotated Symfony Console …
greg-1-anderson May 6, 2016
c288ed8
Taking rebuild container out just caused other problems; perhaps $ker…
greg-1-anderson May 6, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion commands/core/help.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ function drush_core_help($name = '') {
}

// For speed, only bootstrap up to DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION.
drush_bootstrap_max(DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION);
drush_bootstrap_max();
drush_get_commands(true);
$implemented = drush_get_commands();
ksort($implemented);
$command_categories = drush_commands_categorize($implemented);
Expand Down
8 changes: 6 additions & 2 deletions commands/core/helpsingle.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ function drush_core_helpsingle($commandstring) {
if (!array_key_exists($commandstring, $commands)) {
// If the command cannot be found, then bootstrap so that
// additional commands will be brought in.
// For speed, only bootstrap up to DRUSH_BOOTSTRAP_DRUPAL_SITE.
drush_bootstrap_max(DRUSH_BOOTSTRAP_DRUPAL_SITE);
// TODO: We need to do a full bootstrap in order to find module service
// commands. We only need to do this for Drupal 8, though; 7 and earlier
// can stop at DRUSH_BOOTSTRAP_DRUPAL_SITE. Perhaps we could use command
// caching to avoid bootstrapping, if we have collected the commands for
// this site once already.
drush_bootstrap_max();
$commands = drush_get_commands();
}
if (array_key_exists($commandstring, $commands)) {
Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@
"php": ">=5.4.5",
"psr/log": "~1.0",
"psy/psysh": "~0.6",
"consolidation/annotated-command": "~1.0.0-beta6",
"consolidation/output-formatters": "~1.0.0-beta5",
"symfony/yaml": "~2.3",
"symfony/var-dumper": "~2.7",
"symfony/console": "~2.7",
"symfony/finder": "~2.7",
"pear/console_table": "~1.3.0"
},
"require-dev": {
Expand All @@ -47,7 +50,8 @@
},
"autoload": {
"psr-0": {
"Drush": "lib/"
"Drush": "lib/",
"Consolidation": "lib/"
}
},
"autoload-dev": {
Expand Down
Loading