From f2a2511a8c5ec3aadd97f13451e9810726436cda Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Wed, 15 Apr 2015 10:24:15 -0700 Subject: [PATCH 1/4] #88: Include Drupal Console in Drush's composer.json file. Build Drush command records for all Console commands, so that they can be displayed in Drush's help output, and executed. This allows us to run commands such as 'drush @remote x-generate-module', and remotely run Console commands with a Drush alias. Code is still rough at the moment. Console commands are converted from 'generate:module' to 'x-generate-module' to match Drush command conventions without overlapping with existing Drush commands. This won't be the final transformation, but some discussion will be necessary before we can decide on what it should be. --- composer.json | 3 +- includes/command.inc | 78 +++++++++------- includes/consoleadapter.inc | 179 ++++++++++++++++++++++++++++++++++++ includes/preflight.inc | 8 ++ 4 files changed, 233 insertions(+), 35 deletions(-) create mode 100644 includes/consoleadapter.inc diff --git a/composer.json b/composer.json index 019bea8576..dffb92e950 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,8 @@ "d11wtq/boris": "~1.0", "symfony/yaml": "~2.2", "symfony/var-dumper": "2.6.3", - "pear/console_table": "~1.2.0" + "pear/console_table": "~1.2.0", + "drupal/console": "dev-master" }, "require-dev": { "phpunit/phpunit": ">=3.5", diff --git a/includes/command.inc b/includes/command.inc index 720c69b37f..8eec03e5ba 100644 --- a/includes/command.inc +++ b/includes/command.inc @@ -712,6 +712,17 @@ function drush_redispatch_get_options() { // If we can parse the current command, then examine all contexts // in order for any option that is directly related to the current command $command = drush_parse_command(); + $command_options = drush_get_options_for_command($command); + // If --bootstrap-to-first-arg is specified, do not + // pass it along to remote commands. + unset($options['bootstrap-to-first-arg']); + + return $options; +} + +function drush_get_options_for_command($command) +{ + $options = array(); if (is_array($command)) { foreach ($command['options'] as $key => $value) { // Strip leading -- @@ -722,10 +733,6 @@ function drush_redispatch_get_options() { } } } - // If --bootstrap-to-first-arg is specified, do not - // pass it along to remote commands. - unset($options['bootstrap-to-first-arg']); - return $options; } @@ -1010,40 +1017,43 @@ function drush_get_commands($reset = FALSE) { } $list = drush_commandfile_list(); + $results = array(); foreach ($list as $commandfile => $path) { if (drush_command_hook($commandfile, 'drush_command')) { $function = $commandfile . '_drush_command'; - $result = $function(); - foreach ((array)$result as $key => $command) { - // Add some defaults and normalize the command descriptor. - $command += drush_command_defaults($key, $commandfile, $path); - - // Add engine data. - drush_merge_engine_data($command); - - // Translate command. - drush_command_translate($command); - - // If the command callback is not 'drush_command', then - // copy the callback function to an alternate element - // of the command array that will be called when Drush - // calls the command function hooks. Then, set the - // callback to drush_command so that the function hooks - // will be called. - if (($command['callback'] != 'drush_command') && $command['invoke hooks']) { - $command['primary function'] = $command['callback']; - $command['callback'] = 'drush_command'; - } + $results = array_merge($results, (array)$function()); + } + } + $console_commands = drush_get_context('CONSOLE_APPLICATION_COMMANDS'); + $results = array_merge($results, $console_commands); + foreach ((array)$results as $key => $command) { + // Add some defaults and normalize the command descriptor. + $command += drush_command_defaults($key, $commandfile, $path); - $commands[$key] = $command; - // For every alias, make a copy of the command and store it in the command list - // using the alias as a key - if (isset($command['aliases']) && count($command['aliases'])) { - foreach ($command['aliases'] as $alias) { - $commands[$alias] = $command; - $commands[$alias]['is_alias'] = TRUE; - } - } + // Add engine data. + drush_merge_engine_data($command); + + // Translate command. + drush_command_translate($command); + + // If the command callback is not 'drush_command', then + // copy the callback function to an alternate element + // of the command array that will be called when Drush + // calls the command function hooks. Then, set the + // callback to drush_command so that the function hooks + // will be called. + if (($command['callback'] != 'drush_command') && $command['invoke hooks']) { + $command['primary function'] = $command['callback']; + $command['callback'] = 'drush_command'; + } + + $commands[$key] = $command; + // For every alias, make a copy of the command and store it in the command list + // using the alias as a key + if (isset($command['aliases']) && count($command['aliases'])) { + foreach ($command['aliases'] as $alias) { + $commands[$alias] = $command; + $commands[$alias]['is_alias'] = TRUE; } } } diff --git a/includes/consoleadapter.inc b/includes/consoleadapter.inc new file mode 100644 index 0000000000..1e21805dcf --- /dev/null +++ b/includes/consoleadapter.inc @@ -0,0 +1,179 @@ +loadResource($config->get('application.language'), $consoleRoot); + + $application = new Application($config); + $application->setDirectoryRoot($consoleRoot); + + $helpers = [ + 'kernel' => new KernelHelper(), + 'shell' => new ShellHelper(new Shell($application)), + 'dialog' => new DialogHelper(), + 'register_commands' => new RegisterCommandsHelper($application), + 'stringUtils' => new StringUtils(), + 'validators' => new Validators(), + 'translator' => $translatorHelper, + 'drupal-autoload' => new DrupalAutoloadHelper(), + 'message' => new MessageHelper($translatorHelper), + 'chain' => new ChainCommandHelper(), + ]; + + $application->addHelpers($helpers); + + $dispatcher = new EventDispatcher(); + $dispatcher->addSubscriber(new ValidateDependenciesListener()); + $dispatcher->addSubscriber(new ShowWelcomeMessageListener()); + $dispatcher->addSubscriber(new ShowGeneratedFilesListener()); + $dispatcher->addSubscriber(new CallCommandListener()); + $dispatcher->addSubscriber(new ShowCompletedMessageListener()); + + $application->setDispatcher($dispatcher); + $application->setDefaultCommand('list'); + + consoleadapter_add_global_commands($application); + + drush_set_context('CONSOLE_APPLICATION', $application); +} + +// $registerCommandsHelper->getCommands() +// $consoleCommands = $registerCommandsHelper->getConsoleCommands(); +// $customCommands = $registerCommandsHelper->getCustomCommands(); + + +function consoleadapter_add_global_commands($application) { + $registerCommandsHelper = $application->getHelperSet()->get('register_commands'); + $items = consoleadapter_convert_console_commands_to_drush($registerCommandsHelper->getConsoleCommands()); + drush_set_context('CONSOLE_APPLICATION_COMMANDS', $items); +} + +function consoleadapter_add_module_commands() { + /* + $root = drush_get_context('DRUSH_SELECTED_DRUPAL_ROOT'); + $application = drush_get_context('CONSOLE_APPLICATION'); + $registerCommandsHelper = $application->getHelperSet()->get('register_commands'); + $commands = drush_get_context('CONSOLE_APPLICATION_COMMANDS'); + // Add commands defined by Drupal modules + $items = consoleadapter_convert_console_commands_to_drush($registerCommandsHelper->getCustomCommands()); + drush_set_context('CONSOLE_APPLICATION_COMMANDS', array_merge($commands, $items)); + */ +} + +function consoleadapter_callback() { + // Get the application object + $application = drush_get_context('CONSOLE_APPLICATION'); + // Recover our command record + $command = drush_get_command(); + + // Build the command line arguments for the redispatch to the Console application + // TODO: if we wrote our own version of ArgvInput, we could pass $drush_args + // and $command_options to it directly, and avoid having to join-and-reparse + // the args and options. + $argv[] = 'console'; + $argv[] = $command['console-command-name']; + $drush_args = drush_get_arguments(); + array_shift($drush_args); + $command_options = drush_get_options_for_command($command); + $options = array(); + foreach ($command_options as $key => $value) { + $option = "--$key"; + if (!$value) { + $option .= '=0'; + } + elseif ($value !== TRUE) { + $option .= "=$value"; + } + $options[] = $option; + } + $argv = array_merge($argv, $drush_args, $options); + + $application->run(new ArgvInput($argv)); +} + +function consoleadapter_convert_console_commands_to_drush($console_command_list) { + $items = array(); + foreach ($console_command_list as $console_command) { + $console_command_name = $console_command->getName(); + $drush_name = 'x-' . strtr($console_command_name, ':', '-'); + $definition = $console_command->getDefinition(); + $arguments = array(); + foreach ($definition->getArguments() as $arg) { + // We also have $arg->getDefault() and $arg->isRequired() that we could use here + // to create a more complex Drush help record. + $arguments[$arg->getName()] = $arg->getDescription(); + } + $options = array(); + foreach ($definition->getOptions() as $opt) { + // We also have $opt->getDefault() and $opt->isValueOptional() and $opt->getShortcut() + $options[$opt->getName()] = $opt->getDescription(); + } + $items[$drush_name] = array( + // 'console-command' => $console_command, + 'console-command-name' => $console_command_name, + 'description' => $console_command->getDescription(), + 'aliases' => $console_command->getAliases(), + 'arguments' => $arguments, + 'options' => $options, + 'core' => array('8+'), + 'callback' => 'consoleadapter_callback', + // We will let the console command bootstrap, since it expects to do that. + 'bootstrap' => DRUSH_BOOTSTRAP_NONE, + ); + } + return $items; +} diff --git a/includes/preflight.inc b/includes/preflight.inc index c03d6b2a93..00a7a8ecf0 100644 --- a/includes/preflight.inc +++ b/includes/preflight.inc @@ -50,6 +50,7 @@ function drush_preflight_prepare() { require_once DRUSH_BASE_PATH . '/includes/cache.inc'; require_once DRUSH_BASE_PATH . '/includes/filesystem.inc'; require_once DRUSH_BASE_PATH . '/includes/dbtng.inc'; + require_once DRUSH_BASE_PATH . '/includes/consoleadapter.inc'; // Stash our vendor path and classloader. drush_set_context('DRUSH_VENDOR_PATH', dirname(realpath($vendor_path))); @@ -188,6 +189,10 @@ function drush_preflight() { drush_load_config('custom'); _drush_preflight_global_options(); + + // Create the Console Application object, and add the global Console commands + consoleadapter_preflight(); + // Load all the commandfiles findable from any of the // scopes listed above. _drush_find_commandfiles_drush(); @@ -263,6 +268,9 @@ function drush_preflight_root() { // Load the config options from Drupal's /drush and sites/all/drush directories, // even prior to bootstrapping the root. drush_load_config('drupal'); + + // Add whatever drupal console module commands we can find in the root + consoleadapter_add_module_commands(); } function drush_preflight_site() { From fdc341c650621b58d6c5b12e9f5e99f775bf0ac2 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Wed, 15 Apr 2015 10:56:28 -0700 Subject: [PATCH 2/4] Drupal Console made a release with the changes we need, so let's now require ~0 instead of dev-master. Also, commit composer.lock to passify Travis. --- composer.json | 2 +- composer.lock | 1370 +++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 1263 insertions(+), 109 deletions(-) diff --git a/composer.json b/composer.json index dffb92e950..212d796bbc 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "symfony/yaml": "~2.2", "symfony/var-dumper": "2.6.3", "pear/console_table": "~1.2.0", - "drupal/console": "dev-master" + "drupal/console": "~0" }, "require-dev": { "phpunit/phpunit": ">=3.5", diff --git a/composer.lock b/composer.lock index 167b8e01dd..8027b68ae2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,96 +4,1079 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "e79b51ad2fbc6625585ae88991b4e25b", + "hash": "be3f9714724eb03579970f09fb725596", "packages": [ + { + "name": "composer/installers", + "version": "v1.0.21", + "source": { + "type": "git", + "url": "https://github.com/composer/installers.git", + "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/installers/zipball/d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", + "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", + "shasum": "" + }, + "replace": { + "roundcube/plugin-installer": "*", + "shama/baton": "*" + }, + "require-dev": { + "composer/composer": "1.0.*@dev", + "phpunit/phpunit": "4.1.*" + }, + "type": "composer-installer", + "extra": { + "class": "Composer\\Installers\\Installer", + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Composer\\Installers\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle Robinson Young", + "email": "kyle@dontkry.com", + "homepage": "https://github.com/shama" + } + ], + "description": "A multi-framework Composer library installer", + "homepage": "http://composer.github.com/installers/", + "keywords": [ + "Craft", + "Dolibarr", + "Hurad", + "MODX Evo", + "OXID", + "SMF", + "Thelia", + "WolfCMS", + "agl", + "aimeos", + "annotatecms", + "bitrix", + "cakephp", + "chef", + "codeigniter", + "concrete5", + "croogo", + "dokuwiki", + "drupal", + "elgg", + "fuelphp", + "grav", + "installer", + "joomla", + "kohana", + "laravel", + "lithium", + "magento", + "mako", + "mediawiki", + "modulework", + "moodle", + "phpbb", + "piwik", + "ppi", + "puppet", + "roundcube", + "shopware", + "silverstripe", + "symfony", + "typo3", + "wordpress", + "zend", + "zikula" + ], + "time": "2015-02-18 17:17:01" + }, { "name": "d11wtq/boris", - "version": "v1.0.8", + "version": "v1.0.10", + "source": { + "type": "git", + "url": "https://github.com/borisrepl/boris.git", + "reference": "31055b15e2d3fe47f31f6aa8e277f8f3fc7eb483" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/borisrepl/boris/zipball/31055b15e2d3fe47f31f6aa8e277f8f3fc7eb483", + "reference": "31055b15e2d3fe47f31f6aa8e277f8f3fc7eb483", + "shasum": "" + }, + "require": { + "ext-pcntl": "*", + "ext-posix": "*", + "ext-readline": "*", + "php": ">=5.3.0" + }, + "bin": [ + "bin/boris" + ], + "type": "library", + "autoload": { + "psr-0": { + "Boris": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A tiny, but robust REPL (Read-Evaluate-Print-Loop) for PHP.", + "time": "2015-03-01 08:05:19" + }, + { + "name": "drupal/console", + "version": "0.7.9", + "source": { + "type": "git", + "url": "https://github.com/hechoendrupal/DrupalAppConsole.git", + "reference": "5dceda77e2538efa494d36d21b5437ed6f87bf56" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hechoendrupal/DrupalAppConsole/zipball/5dceda77e2538efa494d36d21b5437ed6f87bf56", + "reference": "5dceda77e2538efa494d36d21b5437ed6f87bf56", + "shasum": "" + }, + "require": { + "composer/installers": "~1.0", + "herrera-io/phar-update": "1.*", + "php": ">=5.4.5", + "symfony/config": "2.6.*", + "symfony/console": "2.6.*", + "symfony/debug": "2.6.*", + "symfony/dependency-injection": "2.6.*", + "symfony/dom-crawler": "2.6.*", + "symfony/event-dispatcher": "2.6.*", + "symfony/finder": "2.6.*", + "symfony/translation": "2.6.*", + "symfony/yaml": "2.6.*", + "twig/twig": "1.16.*" + }, + "require-dev": { + "drupal/coder": "~8.1", + "drupal/core": "8.0.0-beta9", + "phpunit/phpunit": "4.4.*" + }, + "bin": [ + "bin/console" + ], + "type": "drupal-module", + "autoload": { + "psr-4": { + "Drupal\\AppConsole\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Flores", + "email": "dmousex@gmail.com", + "homepage": "http://dmouse.net" + }, + { + "name": "Jesus Manuel Olivas", + "email": "jesus.olivas@gmail.com", + "homepage": "http://jmolivas.com" + }, + { + "name": "Drupal Console Contributors", + "homepage": "https://github.com/hechoendrupal/DrupalAppConsole/graphs/contributors" + } + ], + "description": "Drupal Console", + "keywords": [ + "console", + "development", + "drupal" + ], + "time": "2015-04-15 17:13:17" + }, + { + "name": "herrera-io/json", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/herrera-io/php-json.git", + "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/herrera-io/php-json/zipball/60c696c9370a1e5136816ca557c17f82a6fa83f1", + "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1", + "shasum": "" + }, + "require": { + "ext-json": "*", + "justinrainbow/json-schema": ">=1.0,<2.0-dev", + "php": ">=5.3.3", + "seld/jsonlint": ">=1.0,<2.0-dev" + }, + "require-dev": { + "herrera-io/phpunit-test-case": "1.*", + "mikey179/vfsstream": "1.1.0", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": [ + "src/lib/json_version.php" + ], + "psr-0": { + "Herrera\\Json": "src/lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "kevin@herrera.io", + "homepage": "http://kevin.herrera.io/", + "role": "Developer" + } + ], + "description": "A library for simplifying JSON linting and validation.", + "homepage": "http://herrera-io.github.com/php-json", + "keywords": [ + "json", + "lint", + "schema", + "validate" + ], + "time": "2013-10-30 16:51:34" + }, + { + "name": "herrera-io/phar-update", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/herrera-io/php-phar-update.git", + "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/herrera-io/php-phar-update/zipball/00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", + "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", + "shasum": "" + }, + "require": { + "herrera-io/json": "1.*", + "kherge/version": "1.*", + "php": ">=5.3.3" + }, + "require-dev": { + "herrera-io/phpunit-test-case": "1.*", + "mikey179/vfsstream": "1.1.0", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": [ + "src/lib/constants.php" + ], + "psr-0": { + "Herrera\\Phar\\Update": "src/lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "kevin@herrera.io", + "homepage": "http://kevin.herrera.io/", + "role": "Developer" + } + ], + "description": "A library for self-updating Phars.", + "homepage": "http://herrera-io.github.com/php-phar-update", + "keywords": [ + "phar", + "update" + ], + "time": "2013-10-30 17:23:01" + }, + { + "name": "justinrainbow/json-schema", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "2465fe486c864e30badaa4d005ebdf89dbc503f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2465fe486c864e30badaa4d005ebdf89dbc503f3", + "reference": "2465fe486c864e30badaa4d005ebdf89dbc503f3", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "json-schema/json-schema-test-suite": "1.1.0", + "phpdocumentor/phpdocumentor": "~2", + "phpunit/phpunit": "~3.7" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "JsonSchema": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "time": "2015-03-27 16:41:39" + }, + { + "name": "kherge/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/kherge-unmaintained/Version.git", + "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kherge-unmaintained/Version/zipball/f07cf83f8ce533be8f93d2893d96d674bbeb7e30", + "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "KevinGH\\Version": "src/lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "me@kevingh.com", + "homepage": "http://www.kevingh.com/" + } + ], + "description": "A parsing and comparison library for semantic versioning.", + "homepage": "http://github.com/kherge/Version", + "time": "2012-08-16 17:13:03" + }, + { + "name": "pear/console_table", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/RobLoach/Console_Table.git", + "reference": "10d89fbbe533351dcfe5dc1e84de25d9a8395950" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/RobLoach/Console_Table/zipball/10d89fbbe533351dcfe5dc1e84de25d9a8395950", + "reference": "10d89fbbe533351dcfe5dc1e84de25d9a8395950", + "shasum": "" + }, + "require": { + "php": ">=4.3.10" + }, + "suggest": { + "pear/Console_Color2": ">=0.1.2" + }, + "type": "library", + "autoload": { + "classmap": [ + "Table.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jan Schneider", + "homepage": "http://pear.php.net/user/yunosh" + }, + { + "name": "Tal Peer", + "homepage": "http://pear.php.net/user/tal" + }, + { + "name": "Xavier Noguer", + "homepage": "http://pear.php.net/user/xnoguer" + }, + { + "name": "Richard Heyes", + "homepage": "http://pear.php.net/user/richard" + } + ], + "description": "Library that makes it easy to build console style tables.", + "homepage": "http://pear.php.net/package/Console_Table/", + "keywords": [ + "console" + ], + "time": "2014-10-27 10:04:49" + }, + { + "name": "psr/log", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21 11:40:51" + }, + { + "name": "seld/jsonlint", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "863ae85c6d3ef60ca49cb12bd051c4a0648c40c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/863ae85c6d3ef60ca49cb12bd051c4a0648c40c4", + "reference": "863ae85c6d3ef60ca49cb12bd051c4a0648c40c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "time": "2015-01-04 21:18:15" + }, + { + "name": "symfony/config", + "version": "v2.6.6", + "target-dir": "Symfony/Component/Config", + "source": { + "type": "git", + "url": "https://github.com/symfony/Config.git", + "reference": "d91be01336605db8da21b79bc771e46a7276d1bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Config/zipball/d91be01336605db8da21b79bc771e46a7276d1bc", + "reference": "d91be01336605db8da21b79bc771e46a7276d1bc", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/filesystem": "~2.3" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Config\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Config Component", + "homepage": "http://symfony.com", + "time": "2015-03-30 15:54:10" + }, + { + "name": "symfony/console", + "version": "v2.6.6", + "target-dir": "Symfony/Component/Console", + "source": { + "type": "git", + "url": "https://github.com/symfony/Console.git", + "reference": "5b91dc4ed5eb08553f57f6df04c4730a73992667" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Console/zipball/5b91dc4ed5eb08553f57f6df04c4730a73992667", + "reference": "5b91dc4ed5eb08553f57f6df04c4730a73992667", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1", + "symfony/phpunit-bridge": "~2.7", + "symfony/process": "~2.1" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Console\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Console Component", + "homepage": "http://symfony.com", + "time": "2015-03-30 15:54:10" + }, + { + "name": "symfony/debug", + "version": "v2.6.6", + "target-dir": "Symfony/Component/Debug", + "source": { + "type": "git", + "url": "https://github.com/symfony/Debug.git", + "reference": "d49a46a20a8f0544aedac54466750ad787d3d3e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Debug/zipball/d49a46a20a8f0544aedac54466750ad787d3d3e3", + "reference": "d49a46a20a8f0544aedac54466750ad787d3d3e3", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.2", + "symfony/http-foundation": "~2.1", + "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2", + "symfony/phpunit-bridge": "~2.7" + }, + "suggest": { + "symfony/http-foundation": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Debug\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Debug Component", + "homepage": "http://symfony.com", + "time": "2015-03-22 16:55:57" + }, + { + "name": "symfony/dependency-injection", + "version": "v2.6.6", + "target-dir": "Symfony/Component/DependencyInjection", + "source": { + "type": "git", + "url": "https://github.com/symfony/DependencyInjection.git", + "reference": "8e9007012226b4bd41f8afed855c452cf5edc3a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/8e9007012226b4bd41f8afed855c452cf5edc3a6", + "reference": "8e9007012226b4bd41f8afed855c452cf5edc3a6", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "conflict": { + "symfony/expression-language": "<2.6" + }, + "require-dev": { + "symfony/config": "~2.2", + "symfony/expression-language": "~2.6", + "symfony/phpunit-bridge": "~2.7", + "symfony/yaml": "~2.1" + }, + "suggest": { + "symfony/config": "", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\DependencyInjection\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony DependencyInjection Component", + "homepage": "http://symfony.com", + "time": "2015-03-30 15:54:10" + }, + { + "name": "symfony/dom-crawler", + "version": "v2.6.6", + "target-dir": "Symfony/Component/DomCrawler", + "source": { + "type": "git", + "url": "https://github.com/symfony/DomCrawler.git", + "reference": "8897ebf39c7dfb752a5494fa301845a3fbb9e53d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/8897ebf39c7dfb752a5494fa301845a3fbb9e53d", + "reference": "8897ebf39c7dfb752a5494fa301845a3fbb9e53d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/css-selector": "~2.3", + "symfony/phpunit-bridge": "~2.7" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\DomCrawler\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "http://symfony.com", + "time": "2015-03-30 15:54:10" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.6.6", + "target-dir": "Symfony/Component/EventDispatcher", + "source": { + "type": "git", + "url": "https://github.com/symfony/EventDispatcher.git", + "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/70f7c8478739ad21e3deef0d977b38c77f1fb284", + "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0,>=2.0.5", + "symfony/dependency-injection": "~2.6", + "symfony/expression-language": "~2.6", + "symfony/phpunit-bridge": "~2.7", + "symfony/stopwatch": "~2.3" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "http://symfony.com", + "time": "2015-03-13 17:37:22" + }, + { + "name": "symfony/filesystem", + "version": "v2.6.6", + "target-dir": "Symfony/Component/Filesystem", "source": { "type": "git", - "url": "https://github.com/d11wtq/boris.git", - "reference": "125dd4e5752639af7678a22ea597115646d89c6e" + "url": "https://github.com/symfony/Filesystem.git", + "reference": "4983964b3693e4f13449cb3800c64a9112c301b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/d11wtq/boris/zipball/125dd4e5752639af7678a22ea597115646d89c6e", - "reference": "125dd4e5752639af7678a22ea597115646d89c6e", + "url": "https://api.github.com/repos/symfony/Filesystem/zipball/4983964b3693e4f13449cb3800c64a9112c301b4", + "reference": "4983964b3693e4f13449cb3800c64a9112c301b4", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=5.3.3" }, - "suggest": { - "ext-pcntl": "*", - "ext-posix": "*", - "ext-readline": "*" + "require-dev": { + "symfony/phpunit-bridge": "~2.7" }, - "bin": [ - "bin/boris" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, "autoload": { "psr-0": { - "Boris": "lib" + "Symfony\\Component\\Filesystem\\": "" } }, "notification-url": "https://packagist.org/downloads/", - "time": "2014-01-17 12:21:18" + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "http://symfony.com", + "time": "2015-03-22 16:55:57" }, { - "name": "pear/console_table", - "version": "1.2.1", + "name": "symfony/finder", + "version": "v2.6.6", + "target-dir": "Symfony/Component/Finder", "source": { "type": "git", - "url": "https://github.com/RobLoach/Console_Table.git", - "reference": "10d89fbbe533351dcfe5dc1e84de25d9a8395950" + "url": "https://github.com/symfony/Finder.git", + "reference": "5dbe2e73a580618f5b4880fda93406eed25de251" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RobLoach/Console_Table/zipball/10d89fbbe533351dcfe5dc1e84de25d9a8395950", - "reference": "10d89fbbe533351dcfe5dc1e84de25d9a8395950", + "url": "https://api.github.com/repos/symfony/Finder/zipball/5dbe2e73a580618f5b4880fda93406eed25de251", + "reference": "5dbe2e73a580618f5b4880fda93406eed25de251", "shasum": "" }, "require": { - "php": ">=4.3.10" + "php": ">=5.3.3" }, - "suggest": { - "pear/Console_Color2": ">=0.1.2" + "require-dev": { + "symfony/phpunit-bridge": "~2.7" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, "autoload": { - "classmap": [ - "Table.php" - ] + "psr-0": { + "Symfony\\Component\\Finder\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-2-Clause" + "MIT" ], "authors": [ { - "name": "Jan Schneider", - "homepage": "http://pear.php.net/user/yunosh" + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" }, { - "name": "Tal Peer", - "homepage": "http://pear.php.net/user/tal" - }, + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Finder Component", + "homepage": "http://symfony.com", + "time": "2015-03-30 15:54:10" + }, + { + "name": "symfony/translation", + "version": "v2.6.6", + "target-dir": "Symfony/Component/Translation", + "source": { + "type": "git", + "url": "https://github.com/symfony/Translation.git", + "reference": "bd939f05cdaca128f4ddbae1b447d6f0203b60af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Translation/zipball/bd939f05cdaca128f4ddbae1b447d6f0203b60af", + "reference": "bd939f05cdaca128f4ddbae1b447d6f0203b60af", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.3,>=2.3.12", + "symfony/intl": "~2.3", + "symfony/phpunit-bridge": "~2.7", + "symfony/yaml": "~2.2" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Translation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "name": "Xavier Noguer", - "homepage": "http://pear.php.net/user/xnoguer" + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" }, { - "name": "Richard Heyes", - "homepage": "http://pear.php.net/user/richard" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "Library that makes it easy to build console style tables.", - "homepage": "http://pear.php.net/package/Console_Table/", - "keywords": [ - "console" - ], - "time": "2014-10-27 10:04:49" + "description": "Symfony Translation Component", + "homepage": "http://symfony.com", + "time": "2015-03-30 15:54:10" }, { "name": "symfony/var-dumper", @@ -150,22 +1133,25 @@ }, { "name": "symfony/yaml", - "version": "v2.6.3", + "version": "v2.6.6", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "82462a90848a52c2533aa6b598b107d68076b018" + "reference": "174f009ed36379a801109955fc5a71a49fe62dd4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/82462a90848a52c2533aa6b598b107d68076b018", - "reference": "82462a90848a52c2533aa6b598b107d68076b018", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/174f009ed36379a801109955fc5a71a49fe62dd4", + "reference": "174f009ed36379a801109955fc5a71a49fe62dd4", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, "type": "library", "extra": { "branch-alias": { @@ -193,7 +1179,64 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2015-01-03 15:33:07" + "time": "2015-03-30 15:54:10" + }, + { + "name": "twig/twig", + "version": "v1.16.3", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "6dc11a1e8ecfc30e2c68aaeb218148409d8e68af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/6dc11a1e8ecfc30e2c68aaeb218148409d8e68af", + "reference": "6dc11a1e8ecfc30e2c68aaeb218148409d8e68af", + "shasum": "" + }, + "require": { + "php": ">=5.2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.16-dev" + } + }, + "autoload": { + "psr-0": { + "Twig_": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + }, + { + "name": "Twig Team", + "homepage": "http://twig.sensiolabs.org/contributors", + "role": "Contributors" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "http://twig.sensiolabs.org", + "keywords": [ + "templating" + ], + "time": "2014-12-25 19:58:19" } ], "packages-dev": [ @@ -251,18 +1294,127 @@ ], "time": "2014-10-13 12:58:55" }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-03 12:10:50" + }, + { + "name": "phpspec/prophecy", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5", + "reference": "8724cd239f8ef4c046f55a3b18b4d91cc7f3e4c5", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" + }, + "require-dev": { + "phpspec/phpspec": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2015-03-27 19:31:25" + }, { "name": "phpunit/php-code-coverage", - "version": "2.0.15", + "version": "2.0.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "34cc484af1ca149188d0d9e91412191e398e0b67" + "reference": "934fd03eb6840508231a7f73eb8940cf32c3b66c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/34cc484af1ca149188d0d9e91412191e398e0b67", - "reference": "34cc484af1ca149188d0d9e91412191e398e0b67", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/934fd03eb6840508231a7f73eb8940cf32c3b66c", + "reference": "934fd03eb6840508231a7f73eb8940cf32c3b66c", "shasum": "" }, "require": { @@ -311,35 +1463,37 @@ "testing", "xunit" ], - "time": "2015-01-24 10:06:35" + "time": "2015-04-11 04:35:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.3.4", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" + "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb", + "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, "autoload": { "classmap": [ - "File/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -356,7 +1510,7 @@ "filesystem", "iterator" ], - "time": "2013-10-10 15:34:57" + "time": "2015-04-02 05:19:05" }, { "name": "phpunit/php-text-template", @@ -448,16 +1602,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74" + "reference": "eab81d02569310739373308137284e0158424330" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74", - "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/eab81d02569310739373308137284e0158424330", + "reference": "eab81d02569310739373308137284e0158424330", "shasum": "" }, "require": { @@ -493,20 +1647,20 @@ "keywords": [ "tokenizer" ], - "time": "2015-01-17 09:51:32" + "time": "2015-04-08 04:46:07" }, { "name": "phpunit/phpunit", - "version": "4.4.5", + "version": "4.6.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2e8580deebb7d1ac92ac878595e6bffe01069c2a" + "reference": "163232991e652e6efed2f8470326fffa61e848e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2e8580deebb7d1ac92ac878595e6bffe01069c2a", - "reference": "2e8580deebb7d1ac92ac878595e6bffe01069c2a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/163232991e652e6efed2f8470326fffa61e848e2", + "reference": "163232991e652e6efed2f8470326fffa61e848e2", "shasum": "" }, "require": { @@ -516,19 +1670,19 @@ "ext-reflection": "*", "ext-spl": "*", "php": ">=5.3.3", - "phpunit/php-code-coverage": "~2.0", - "phpunit/php-file-iterator": "~1.3.2", + "phpspec/prophecy": "~1.3,>=1.3.1", + "phpunit/php-code-coverage": "~2.0,>=2.0.11", + "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0.2", + "phpunit/php-timer": "~1.0", "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.0", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.1", - "sebastian/exporter": "~1.1", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.2", + "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", - "sebastian/recursion-context": "~1.0", "sebastian/version": "~1.0", - "symfony/yaml": "~2.0" + "symfony/yaml": "~2.1|~3.0" }, "suggest": { "phpunit/php-invoker": "~1.1" @@ -539,7 +1693,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4.x-dev" + "dev-master": "4.6.x-dev" } }, "autoload": { @@ -565,29 +1719,29 @@ "testing", "xunit" ], - "time": "2015-01-27 16:06:15" + "time": "2015-04-11 05:23:21" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.0", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "c63d2367247365f688544f0d500af90a11a44c65" + "reference": "74ffb87f527f24616f72460e54b595f508dccb5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c63d2367247365f688544f0d500af90a11a44c65", - "reference": "c63d2367247365f688544f0d500af90a11a44c65", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/74ffb87f527f24616f72460e54b595f508dccb5c", + "reference": "74ffb87f527f24616f72460e54b595f508dccb5c", "shasum": "" }, "require": { - "doctrine/instantiator": "~1.0,>=1.0.1", + "doctrine/instantiator": "~1.0,>=1.0.2", "php": ">=5.3.3", "phpunit/php-text-template": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~4.3" + "phpunit/phpunit": "~4.4" }, "suggest": { "ext-soap": "*" @@ -620,7 +1774,7 @@ "mock", "xunit" ], - "time": "2014-10-03 05:12:11" + "time": "2015-04-02 05:36:41" }, { "name": "sebastian/comparator", @@ -688,16 +1842,16 @@ }, { "name": "sebastian/diff", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "5843509fed39dee4b356a306401e9dd1a931fec7" + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/5843509fed39dee4b356a306401e9dd1a931fec7", - "reference": "5843509fed39dee4b356a306401e9dd1a931fec7", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", "shasum": "" }, "require": { @@ -709,7 +1863,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -736,32 +1890,32 @@ "keywords": [ "diff" ], - "time": "2014-08-15 10:29:00" + "time": "2015-02-22 15:13:53" }, { "name": "sebastian/environment", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7" + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e6c71d918088c251b181ba8b3088af4ac336dd7", - "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.3" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -786,7 +1940,7 @@ "environment", "hhvm" ], - "time": "2014-10-25 08:00:45" + "time": "2015-01-01 10:01:08" }, { "name": "sebastian/exporter", @@ -960,16 +2114,16 @@ }, { "name": "sebastian/version", - "version": "1.0.4", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "a77d9123f8e809db3fbdea15038c27a95da4058b" + "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/a77d9123f8e809db3fbdea15038c27a95da4058b", - "reference": "a77d9123f8e809db3fbdea15038c27a95da4058b", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", + "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", "shasum": "" }, "type": "library", @@ -991,7 +2145,7 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2014-12-15 14:25:24" + "time": "2015-02-24 06:35:25" }, { "name": "symfony/process", From 639f9818e630d7ff5476e15979aa53191b0a978a Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Wed, 15 Apr 2015 11:36:36 -0700 Subject: [PATCH 3/4] Fix up console command conversion; also, set DRUSH_EXECUTION_COMPLETED before $application->run(), to prevent Drush from complaining about the call to exit(). --- includes/command.inc | 23 +++++++++++++++-------- includes/consoleadapter.inc | 7 ++++++- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/includes/command.inc b/includes/command.inc index 8eec03e5ba..170d8c0b07 100644 --- a/includes/command.inc +++ b/includes/command.inc @@ -1021,15 +1021,17 @@ function drush_get_commands($reset = FALSE) { foreach ($list as $commandfile => $path) { if (drush_command_hook($commandfile, 'drush_command')) { $function = $commandfile . '_drush_command'; - $results = array_merge($results, (array)$function()); + $items = (array)$function(); + foreach ($items as $key => $command) { + // Add some defaults and normalize the command descriptor. + $command += drush_command_defaults($key, $commandfile, $path); + $results[$key] = $command; + } } } $console_commands = drush_get_context('CONSOLE_APPLICATION_COMMANDS'); $results = array_merge($results, $console_commands); foreach ((array)$results as $key => $command) { - // Add some defaults and normalize the command descriptor. - $command += drush_command_defaults($key, $commandfile, $path); - // Add engine data. drush_merge_engine_data($command); @@ -1061,14 +1063,20 @@ function drush_get_commands($reset = FALSE) { return $commands; } -function drush_command_defaults($key, $commandfile, $path) { + function drush_command_defaults($key, $commandfile, $path) { + return array( + 'commandfile' => $commandfile, + 'path' => dirname($path), + 'category' => $commandfile, + ) + _drush_command_defaults($key); + } + + function _drush_command_defaults($key) { $defaults = array( 'command' => $key, 'command-hook' => $key, 'invoke hooks' => TRUE, 'callback arguments' => array(), - 'commandfile' => $commandfile, - 'path' => dirname($path), 'engines' => array(), // Helpful for drush_show_help(). 'callback' => 'drush_command', 'primary function' => FALSE, @@ -1095,7 +1103,6 @@ function drush_command_defaults($key, $commandfile, $path) { 'bootstrap_errors' => array(), 'topics' => array(), 'hidden' => FALSE, - 'category' => $commandfile, ); // We end up here, setting the defaults for a command, when // called from drush_get_global_options(). Early in the Drush diff --git a/includes/consoleadapter.inc b/includes/consoleadapter.inc index 1e21805dcf..411b596e0f 100644 --- a/includes/consoleadapter.inc +++ b/includes/consoleadapter.inc @@ -142,6 +142,8 @@ function consoleadapter_callback() { } $argv = array_merge($argv, $drush_args, $options); + // Console exits, so we'd better tell the shutdown function that that's okay. + drush_set_context("DRUSH_EXECUTION_COMPLETED", TRUE); $application->run(new ArgvInput($argv)); } @@ -173,7 +175,10 @@ function consoleadapter_convert_console_commands_to_drush($console_command_list) 'callback' => 'consoleadapter_callback', // We will let the console command bootstrap, since it expects to do that. 'bootstrap' => DRUSH_BOOTSTRAP_NONE, - ); + 'commandfile' => 'core', + 'path' => FALSE, + 'category' => 'console', + ) + _drush_command_defaults($drush_name); } return $items; } From 766dcc8d6b8add3e9feee990c6fc55da704d3902 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 17 Apr 2015 09:37:02 -0700 Subject: [PATCH 4/4] Console bootstrap has been refactored, so Drush can have it create the kernel object during the bootstrap configuration phase, and then bootstrap the kernel in the bootstrap full phase. --- composer.json | 2 +- composer.lock | 71 ++++++++++++++++++++++++++++++---- includes/consoleadapter.inc | 12 +++--- includes/preflight.inc | 3 -- lib/Drush/Boot/DrupalBoot8.php | 25 ++++++++++-- 5 files changed, 91 insertions(+), 22 deletions(-) diff --git a/composer.json b/composer.json index 212d796bbc..dffb92e950 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "symfony/yaml": "~2.2", "symfony/var-dumper": "2.6.3", "pear/console_table": "~1.2.0", - "drupal/console": "~0" + "drupal/console": "dev-master" }, "require-dev": { "phpunit/phpunit": ">=3.5", diff --git a/composer.lock b/composer.lock index 8027b68ae2..5b1b18836a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "be3f9714724eb03579970f09fb725596", + "hash": "71173c7386a8df209ed4f5197aae2b84", "packages": [ { "name": "composer/installers", @@ -139,16 +139,16 @@ }, { "name": "drupal/console", - "version": "0.7.9", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/hechoendrupal/DrupalAppConsole.git", - "reference": "5dceda77e2538efa494d36d21b5437ed6f87bf56" + "reference": "3eb00b790ec687b8bcecd13ff18ccd48b5860ff3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hechoendrupal/DrupalAppConsole/zipball/5dceda77e2538efa494d36d21b5437ed6f87bf56", - "reference": "5dceda77e2538efa494d36d21b5437ed6f87bf56", + "url": "https://api.github.com/repos/hechoendrupal/DrupalAppConsole/zipball/3eb00b790ec687b8bcecd13ff18ccd48b5860ff3", + "reference": "3eb00b790ec687b8bcecd13ff18ccd48b5860ff3", "shasum": "" }, "require": { @@ -162,6 +162,7 @@ "symfony/dom-crawler": "2.6.*", "symfony/event-dispatcher": "2.6.*", "symfony/finder": "2.6.*", + "symfony/http-foundation": "2.6.*", "symfony/translation": "2.6.*", "symfony/yaml": "2.6.*", "twig/twig": "1.16.*" @@ -206,7 +207,7 @@ "development", "drupal" ], - "time": "2015-04-15 17:13:17" + "time": "2015-04-17 07:19:01" }, { "name": "herrera-io/json", @@ -1019,6 +1020,60 @@ "homepage": "http://symfony.com", "time": "2015-03-30 15:54:10" }, + { + "name": "symfony/http-foundation", + "version": "v2.6.6", + "target-dir": "Symfony/Component/HttpFoundation", + "source": { + "type": "git", + "url": "https://github.com/symfony/HttpFoundation.git", + "reference": "8a6337233f08f7520de97f4ffd6f00e947d892f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/8a6337233f08f7520de97f4ffd6f00e947d892f9", + "reference": "8a6337233f08f7520de97f4ffd6f00e947d892f9", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/expression-language": "~2.4", + "symfony/phpunit-bridge": "~2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "classmap": [ + "Symfony/Component/HttpFoundation/Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "http://symfony.com", + "time": "2015-04-01 16:50:12" + }, { "name": "symfony/translation", "version": "v2.6.6", @@ -2199,7 +2254,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "drupal/console": 20 + }, "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/includes/consoleadapter.inc b/includes/consoleadapter.inc index 411b596e0f..73e511d56f 100644 --- a/includes/consoleadapter.inc +++ b/includes/consoleadapter.inc @@ -102,16 +102,16 @@ function consoleadapter_add_global_commands($application) { drush_set_context('CONSOLE_APPLICATION_COMMANDS', $items); } -function consoleadapter_add_module_commands() { - /* - $root = drush_get_context('DRUSH_SELECTED_DRUPAL_ROOT'); +function consoleadapter_add_module_commands($root) { $application = drush_get_context('CONSOLE_APPLICATION'); - $registerCommandsHelper = $application->getHelperSet()->get('register_commands'); + $kernel = $application->bootstrap($root); $commands = drush_get_context('CONSOLE_APPLICATION_COMMANDS'); // Add commands defined by Drupal modules + $registerCommandsHelper = $application->getHelperSet()->get('register_commands'); $items = consoleadapter_convert_console_commands_to_drush($registerCommandsHelper->getCustomCommands()); drush_set_context('CONSOLE_APPLICATION_COMMANDS', array_merge($commands, $items)); - */ + + return $kernel; } function consoleadapter_callback() { @@ -173,8 +173,6 @@ function consoleadapter_convert_console_commands_to_drush($console_command_list) 'options' => $options, 'core' => array('8+'), 'callback' => 'consoleadapter_callback', - // We will let the console command bootstrap, since it expects to do that. - 'bootstrap' => DRUSH_BOOTSTRAP_NONE, 'commandfile' => 'core', 'path' => FALSE, 'category' => 'console', diff --git a/includes/preflight.inc b/includes/preflight.inc index 00a7a8ecf0..2d7a2c1d6b 100644 --- a/includes/preflight.inc +++ b/includes/preflight.inc @@ -268,9 +268,6 @@ function drush_preflight_root() { // Load the config options from Drupal's /drush and sites/all/drush directories, // even prior to bootstrapping the root. drush_load_config('drupal'); - - // Add whatever drupal console module commands we can find in the root - consoleadapter_add_module_commands(); } function drush_preflight_site() { diff --git a/lib/Drush/Boot/DrupalBoot8.php b/lib/Drush/Boot/DrupalBoot8.php index 1664bd5cb6..f2a3c0586c 100644 --- a/lib/Drush/Boot/DrupalBoot8.php +++ b/lib/Drush/Boot/DrupalBoot8.php @@ -74,9 +74,19 @@ function bootstrap_drupal_database() { } function bootstrap_drupal_configuration() { - $this->request = Request::createFromGlobals(); $classloader = drush_drupal_load_autoloader(DRUPAL_ROOT); - $this->kernel = DrupalKernel::createFromRequest($this->request, $classloader, 'prod'); + $application = drush_get_context('CONSOLE_APPLICATION'); + if (!empty($application)) { + $application->setDrupalAutoLoad($classloader); + $debug = drush_get_context('DRUSH_DEBUG', FALSE); + $application->setup('prod', $debug); + $this->kernel = $application->getKernel(); + $this->request = $application->getHelperSet()->get('kernel')->getRequest(); + } + else { + $this->request = Request::createFromGlobals(); + $this->kernel = DrupalKernel::createFromRequest($this->request, $classloader, 'prod'); + } // Unset drupal error handler and restore drush's one. restore_error_handler(); @@ -88,8 +98,15 @@ function bootstrap_drupal_full() { if (!drush_get_context('DRUSH_QUIET', FALSE)) { ob_start(); } - $this->kernel->boot(); - $this->kernel->prepareLegacyRequest($this->request); + $application = drush_get_context('CONSOLE_APPLICATION'); + if (!empty($application)) { + $application->bootstrap(); + consoleadapter_add_module_commands(DRUPAL_ROOT); + } + else { + $this->kernel->boot(); + $this->kernel->prepareLegacyRequest($this->request); + } if (!drush_get_context('DRUSH_QUIET', FALSE)) { ob_end_clean(); }