Hello community, here is the log from the commit of package drush for openSUSE:Factory checked in at 2018-11-22 13:27:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/drush (Old) and /work/SRC/openSUSE:Factory/.drush.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "drush" Thu Nov 22 13:27:18 2018 rev:8 rq:650789 version:8.1.18 Changes: -------- --- /work/SRC/openSUSE:Factory/drush/drush.changes 2018-05-30 13:09:28.252378893 +0200 +++ /work/SRC/openSUSE:Factory/.drush.new.19453/drush.changes 2018-11-22 13:27:25.701880672 +0100 @@ -1,0 +2,20 @@ +Wed Nov 21 23:34:32 UTC 2018 - [email protected] + +- Update to version 8.1.18: + * Prep for 8.1.18 + * Restore 91da7528, inadvertantly reverted. (#3791) + * Add tests for Drupal 8.46 with PHP 7. + * Only remove the fallback if the 'mysql' extension isn't available + * Fixed that Drush always sneakily uses the mysql extension even though mysqli is configured and the extension is enabled + * Fixes #3761. Taking into account unreadable output of 'stty size' when... (#3764) + * Set a non-zero exit status for "sql-create" on failure (#3733) + * Fix #2282, #2079. Do not pass this->query_extra to pg_dump. Refs #3727. + * Remove fifth argument of error handler. (#3712) + * Backport #3687: preserve 'contrib' and 'custom' dir placements (#3702) + * adding drush option to core-cli so that we can change the default working directory + * Set maintenance mode to update when running updates (#3605) + * #2183: Mention possible conflict of ~/.my.cnf vs --defaults-extra-file (#3581) + * fix Drush command sql-query with option "--db-prefix" in use (#3529) + * Back to dev. + +------------------------------------------------------------------- Old: ---- drush-8.1.17.tar.xz New: ---- drush-8.1.18.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ drush.spec ++++++ --- /var/tmp/diff_new_pack.ioa5Hq/_old 2018-11-22 13:27:26.745879579 +0100 +++ /var/tmp/diff_new_pack.ioa5Hq/_new 2018-11-22 13:27:26.749879575 +0100 @@ -12,12 +12,12 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: drush -Version: 8.1.17 +Version: 8.1.18 Release: 0 Summary: Command line shell and scripting interface for Drupal # See licenses.txt for dependency licenses. ++++++ _service ++++++ --- /var/tmp/diff_new_pack.ioa5Hq/_old 2018-11-22 13:27:26.773879550 +0100 +++ /var/tmp/diff_new_pack.ioa5Hq/_new 2018-11-22 13:27:26.777879546 +0100 @@ -1,7 +1,7 @@ <services> <service name="tar_scm" mode="disabled"> <param name="versionformat">@PARENT_TAG@</param> - <param name="revision">refs/tags/8.1.17</param> + <param name="revision">refs/tags/8.1.18</param> <param name="url">git://github.com/drush-ops/drush.git</param> <param name="scm">git</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.ioa5Hq/_old 2018-11-22 13:27:26.789879533 +0100 +++ /var/tmp/diff_new_pack.ioa5Hq/_new 2018-11-22 13:27:26.789879533 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/drush-ops/drush.git</param> - <param name="changesrevision">7ea681dc7e639f6ddab906e78611d3558f88d9b0</param> + <param name="changesrevision">799e4135ad7161f1a4668164ff8a6e5bcd779fc7</param> </service> </servicedata> ++++++ drush-8.1.17.tar.xz -> drush-8.1.18.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/.travis.yml new/drush-8.1.18/.travis.yml --- old/drush-8.1.17/.travis.yml 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/.travis.yml 2018-11-21 23:57:06.000000000 +0100 @@ -27,33 +27,17 @@ matrix: include: - # D8.5.x - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=5.0-rc1 PHPUNIT_ARGS=--group=base' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=5.0-rc1 PHPUNIT_ARGS=--group=commands' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=5.0-rc1 PHPUNIT_ARGS=--group=pm' + # D8.6.x - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=5.0-rc1 PHPUNIT_ARGS=--group=quick-drupal' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=5.0-rc1 PHPUNIT_ARGS=--group=make' + env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=6.3' + + # D8.5.x - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=5.0-rc1 PHPUNIT_ARGS=--exclude-group=base,make,commands,pm,quick-drupal TEST_CHILDREN="drush-ops/config-extra"' + env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=5.8' # D8.4.x - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.5 PHPUNIT_ARGS=--group=base' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.5 PHPUNIT_ARGS=--group=commands' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.5 PHPUNIT_ARGS=--group=pm' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.5 PHPUNIT_ARGS=--group=quick-drupal' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.5 PHPUNIT_ARGS=--group=make' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.5 PHPUNIT_ARGS=--exclude-group=base,make,commands,pm,quick-drupal TEST_CHILDREN="drush-ops/config-extra"' + env: 'UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.5' # D8.3.x - php: 7.0 @@ -65,42 +49,19 @@ # D7 - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=base' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=commands' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=pm' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=quick-drupal' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=make' - - php: 7.0 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--exclude-group=base,make,commands,pm,quick-drupal TEST_CHILDREN="drush-ops/config-extra"' + env: 'UNISH_DRUPAL_MAJOR_VERSION=7' # D7 - php: 5.6 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=base' - - php: 5.6 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=commands' - - php: 5.6 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=pm' - - php: 5.6 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=quick-drupal' - - php: 5.6 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=make' - - php: 5.6 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--exclude-group=base,make,commands,pm,quick-drupal TEST_CHILDREN="drush-ops/config-extra"' + env: 'UNISH_DRUPAL_MAJOR_VERSION=7' + + # D6 + - php: 7.0 + env: 'UNISH_DRUPAL_MAJOR_VERSION=6' # D6 - # Note that Drupal 6 does not work with PHP 7 - - php: 5.4 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=base' - - php: 5.4 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=commands' - - php: 5.4 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=pm' - php: 5.4 - env: 'UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--exclude-group=base,make,commands,pm,quick-drupal TEST_CHILDREN="drush-ops/config-extra"' + env: 'UNISH_DRUPAL_MAJOR_VERSION=6' before_install: - echo 'mbstring.http_input = pass' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/commands/core/cli.drush.inc new/drush-8.1.18/commands/core/cli.drush.inc --- old/drush-8.1.17/commands/core/cli.drush.inc 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/commands/core/cli.drush.inc 2018-11-21 23:57:06.000000000 +0100 @@ -19,6 +19,7 @@ 'topics' => array('docs-repl'), 'options' => array( 'version-history' => 'Use command history based on Drupal version (Default is per site).', + 'cwd' => 'Changes the working directory of the shell (Default is the project root directory)', ), ); $items['docs-repl'] = array( @@ -94,6 +95,12 @@ if ($drupal_major_version == 7) { Database::closeConnection(); } + + // if the cwd option is passed, lets change the current working directory to wherever + // the user wants to go before we lift psysh. + if ($cwd = drush_get_option('cwd',FALSE)) { + chdir($cwd); + } $shell->run(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/commands/core/core.drush.inc new/drush-8.1.18/commands/core/core.drush.inc --- old/drush-8.1.17/commands/core/core.drush.inc 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/commands/core/core.drush.inc 2018-11-21 23:57:06.000000000 +0100 @@ -32,6 +32,7 @@ $message .= dt("Hint: This may occur when Drush is trying to:\n"); $message .= dt(" * bootstrap a site that has not been installed or does not have a configured database. In this case you can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command line. See `drush topic docs-aliases` for details.\n"); $message .= dt(" * connect the database through a socket. The socket file may be wrong or the php-cli may have no access to it in a jailed shell. See http://drupal.org/node/1428638 for details.\n"); + $message .= dt(" * connect to the database through a cli command using the --defaults-extra-file parameter to pass credentials through a tmp file. This method can break if other credentials are specified in a ~/.my.cnf file in your home directory. You may have to delete or rename the ~/.my.cnf file in your home directory.\n"); $message .= dt("\nDrush was attempting to connect to: \n!credentials\n", array('!credentials' => _core_site_credentials(12))); return $message; case 'error:DRUSH_DRUPAL_BOOTSTRAP_ERROR': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/commands/core/drupal/update.inc new/drush-8.1.18/commands/core/drupal/update.inc --- old/drush-8.1.17/commands/core/drupal/update.inc 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/commands/core/drupal/update.inc 2018-11-21 23:57:06.000000000 +0100 @@ -39,6 +39,11 @@ function drush_update_do_one($module, $number, $dependency_map, &$context) { $function = $module . '_update_' . $number; + // Disable config entity overrides. + if (!defined('MAINTENANCE_MODE')) { + define('MAINTENANCE_MODE', 'update'); + } + // If this update was aborted in a previous step, or has a dependency that // was aborted in a previous step, go no further. if (!empty($context['results']['#abort']) && array_intersect($context['results']['#abort'], array_merge($dependency_map, array($function)))) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/commands/core/site_install.drush.inc new/drush-8.1.18/commands/core/site_install.drush.inc --- old/drush-8.1.17/commands/core/site_install.drush.inc 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/commands/core/site_install.drush.inc 2018-11-21 23:57:06.000000000 +0100 @@ -99,6 +99,7 @@ } // Make sure that we will bootstrap to the 'sites-subdir' site. drush_set_context('DRUSH_SELECTED_URI', 'http://' . $sites_subdir); + drush_sitealias_create_self_alias(); } if ($config = drush_get_option('config-dir')) { @@ -175,24 +176,11 @@ if (!drush_op('copy', 'sites/default/default.settings.php', $settingsfile) && !drush_get_context('DRUSH_SIMULATE')) { return drush_set_error(dt('Failed to copy sites/default/default.settings.php to @settingsfile', array('@settingsfile' => $settingsfile))); } + } - if (drush_drupal_major_version() == 6) { - // On D6, we have to write $db_url ourselves. In D7+, the installer does it. - file_put_contents($settingsfile, "\n" . '$db_url = \'' . drush_get_option('db-url') . "';\n", FILE_APPEND); - // Instead of parsing and performing string replacement on the configuration file, - // the options are appended and override the defaults. - // Database table prefix - if (!empty($db_spec['db_prefix'])) { - if (is_array($db_spec['db_prefix'])) { - // Write db_prefix configuration as an array - $db_prefix_config = '$db_prefix = ' . var_export($db_spec['db_prefix'], TRUE) . ';'; - } - else { - // Write db_prefix configuration as a string - $db_prefix_config = '$db_prefix = \'' . $db_spec['db_prefix'] . '\';'; - } - file_put_contents($settingsfile, "\n" . $db_prefix_config . "\n", FILE_APPEND); - } + if (drush_drupal_major_version() == 6) { + if (!_drush_core_site_install_add_db_url_to_settings($settingsfile, $db_spec)) { + return drush_set_error(dt('Failed to write database settings to @settingsfile', array('@settingsfile' => $settingsfile))); } } @@ -220,6 +208,34 @@ return TRUE; } +function _drush_core_site_install_add_db_url_to_settings($settingsfile, $db_spec) { + $settingsContents = file_get_contents($settingsfile); + if (preg_match('#^.db_url *=#', $settingsContents)) { + return true; + } + // On D6, we have to write $db_url ourselves. In D7+, the installer does it. + if (file_put_contents($settingsfile, "\n" . '$db_url = \'' . drush_convert_db_url(drush_get_option('db-url')) . "';\n", FILE_APPEND) === false) { + return false; + } + + // Instead of parsing and performing string replacement on the configuration file, + // the options are appended and override the defaults. + // Database table prefix + if (!empty($db_spec['db_prefix'])) { + if (is_array($db_spec['db_prefix'])) { + // Write db_prefix configuration as an array + $db_prefix_config = '$db_prefix = ' . var_export($db_spec['db_prefix'], TRUE) . ';'; + } + else { + // Write db_prefix configuration as a string + $db_prefix_config = '$db_prefix = \'' . $db_spec['db_prefix'] . '\';'; + } + file_put_contents($settingsfile, "\n" . $db_prefix_config . "\n", FILE_APPEND); + } + return true; +} + + /** * Command callback. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/commands/sql/sql.drush.inc new/drush-8.1.18/commands/sql/sql.drush.inc --- old/drush-8.1.17/commands/sql/sql.drush.inc 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/commands/sql/sql.drush.inc 2018-11-21 23:57:06.000000000 +0100 @@ -240,7 +240,11 @@ } } - return $sql->createdb(TRUE); + $result = $sql->createdb(TRUE); + if (!$result) { + drush_set_error('DRUSH_SQL_CREATE_ERROR', dt('SQL create database error occurred.')); + } + return $result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/composer.json new/drush-8.1.18/composer.json --- old/drush-8.1.17/composer.json 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/composer.json 2018-11-21 23:57:06.000000000 +0100 @@ -36,7 +36,7 @@ "php": ">=5.4.5", "psr/log": "~1.0", "psy/psysh": "~0.6", - "consolidation/annotated-command": "^2.8.1", + "consolidation/annotated-command": "^2.9.1", "consolidation/output-formatters": "~3", "symfony/yaml": "~2.3|^3", "symfony/var-dumper": "~2.7|^3", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/composer.lock new/drush-8.1.18/composer.lock --- old/drush-8.1.17/composer.lock 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/composer.lock 2018-11-21 23:57:06.000000000 +0100 @@ -1,36 +1,37 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f964f597be5b57a32e5078444ed7d0f4", + "content-hash": "212f332e747566b2707730cb23824682", "packages": [ { "name": "consolidation/annotated-command", - "version": "2.8.1", + "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "7f94009d732922d61408536f9228aca8f22e9135" + "reference": "4bdbb8fa149e1cc1511bd77b0bc4729fd66bccac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/7f94009d732922d61408536f9228aca8f22e9135", - "reference": "7f94009d732922d61408536f9228aca8f22e9135", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/4bdbb8fa149e1cc1511bd77b0bc4729fd66bccac", + "reference": "4bdbb8fa149e1cc1511bd77b0bc4729fd66bccac", "shasum": "" }, "require": { "consolidation/output-formatters": "^3.1.12", "php": ">=5.4.0", "psr/log": "^1", - "symfony/console": "^2.8|~3", - "symfony/event-dispatcher": "^2.5|^3", - "symfony/finder": "^2.5|^3" + "symfony/console": "^2.8|^3|^4", + "symfony/event-dispatcher": "^2.5|^3|^4", + "symfony/finder": "^2.5|^3|^4" }, "require-dev": { - "phpunit/phpunit": "^4.8", - "satooshi/php-coveralls": "^1.0", + "g1a/composer-test-scenarios": "^2", + "phpunit/phpunit": "^6", + "satooshi/php-coveralls": "^2", "squizlabs/php_codesniffer": "^2.7" }, "type": "library", @@ -55,33 +56,39 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2017-10-17T01:48:51+00:00" + "time": "2018-09-19T17:47:18+00:00" }, { "name": "consolidation/output-formatters", - "version": "3.1.12", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/consolidation/output-formatters.git", - "reference": "88ef346a1cefb92aab8b57a3214a6d5fc63f5d2a" + "reference": "d78ef59aea19d3e2e5a23f90a055155ee78a0ad5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/88ef346a1cefb92aab8b57a3214a6d5fc63f5d2a", - "reference": "88ef346a1cefb92aab8b57a3214a6d5fc63f5d2a", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/d78ef59aea19d3e2e5a23f90a055155ee78a0ad5", + "reference": "d78ef59aea19d3e2e5a23f90a055155ee78a0ad5", "shasum": "" }, "require": { "php": ">=5.4.0", - "symfony/console": "^2.8|~3", - "symfony/finder": "~2.5|~3.0" + "symfony/console": "^2.8|^3|^4", + "symfony/finder": "^2.5|^3|^4" }, "require-dev": { - "phpunit/phpunit": "^4.8", - "satooshi/php-coveralls": "^1.0", + "g1a/composer-test-scenarios": "^2", + "phpunit/phpunit": "^5.7.27", + "satooshi/php-coveralls": "^2", "squizlabs/php_codesniffer": "^2.7", + "symfony/console": "3.2.3", + "symfony/var-dumper": "^2.8|^3|^4", "victorjonsson/markdowndocs": "^1.3" }, + "suggest": { + "symfony/var-dumper": "For using the var_dump formatter" + }, "type": "library", "extra": { "branch-alias": { @@ -104,7 +111,7 @@ } ], "description": "Format text by applying transformations provided by plug-in formatters.", - "time": "2017-10-12T19:38:03+00:00" + "time": "2018-05-25T18:02:34+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -381,31 +388,32 @@ }, { "name": "psy/psysh", - "version": "v0.8.14", + "version": "v0.9.8", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "91e53c16560bdb8b9592544bb38429ae00d6baee" + "reference": "ed3c32c4304e1a678a6e0f9dc11dd2d927d89555" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/91e53c16560bdb8b9592544bb38429ae00d6baee", - "reference": "91e53c16560bdb8b9592544bb38429ae00d6baee", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/ed3c32c4304e1a678a6e0f9dc11dd2d927d89555", + "reference": "ed3c32c4304e1a678a6e0f9dc11dd2d927d89555", "shasum": "" }, "require": { "dnoegel/php-xdg-base-dir": "0.1", + "ext-json": "*", + "ext-tokenizer": "*", "jakub-onderka/php-console-highlighter": "0.3.*", - "nikic/php-parser": "~1.3|~2.0|~3.0", - "php": ">=5.3.9", - "symfony/console": "~2.3.10|^2.4.2|~3.0", - "symfony/var-dumper": "~2.7|~3.0" + "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", + "php": ">=5.4.0", + "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0", + "symfony/var-dumper": "~2.7|~3.0|~4.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~1.11", - "hoa/console": "~3.16|~1.14", - "phpunit/phpunit": "~4.4|~5.0", - "symfony/finder": "~2.1|~3.0" + "bamarni/composer-bin-plugin": "^1.2", + "hoa/console": "~2.15|~3.16", + "phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", @@ -420,15 +428,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "0.8.x-dev" + "dev-develop": "0.9.x-dev" } }, "autoload": { "files": [ - "src/Psy/functions.php" + "src/functions.php" ], "psr-4": { - "Psy\\": "src/Psy/" + "Psy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -450,20 +458,20 @@ "interactive", "shell" ], - "time": "2017-11-04T16:06:49+00:00" + "time": "2018-09-05T11:40:09+00:00" }, { "name": "symfony/console", - "version": "v2.8.28", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f81549d2c5fdee8d711c9ab3c7e7362353ea5853" + "reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f81549d2c5fdee8d711c9ab3c7e7362353ea5853", - "reference": "f81549d2c5fdee8d711c9ab3c7e7362353ea5853", + "url": "https://api.github.com/repos/symfony/console/zipball/0c1fcbb9afb5cff992c982ff99c0434f0146dcfc", + "reference": "0c1fcbb9afb5cff992c982ff99c0434f0146dcfc", "shasum": "" }, "require": { @@ -477,7 +485,7 @@ "symfony/process": "~2.1|~3.0.0" }, "suggest": { - "psr/log": "For using the console logger", + "psr/log-implementation": "For using the console logger", "symfony/event-dispatcher": "", "symfony/process": "" }, @@ -511,20 +519,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-10-01T21:00:16+00:00" + "time": "2018-07-26T11:13:39+00:00" }, { "name": "symfony/debug", - "version": "v2.8.28", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "eaaec993ca5e8067e204b2ee653cdd142961f33e" + "reference": "cbb8a5f212148964efbc414838c527229f9951b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/eaaec993ca5e8067e204b2ee653cdd142961f33e", - "reference": "eaaec993ca5e8067e204b2ee653cdd142961f33e", + "url": "https://api.github.com/repos/symfony/debug/zipball/cbb8a5f212148964efbc414838c527229f9951b7", + "reference": "cbb8a5f212148964efbc414838c527229f9951b7", "shasum": "" }, "require": { @@ -568,20 +576,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-10-01T21:00:16+00:00" + "time": "2018-08-03T09:45:57+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v2.8.28", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "7fe089232554357efb8d4af65ce209fc6e5a2186" + "reference": "84ae343f39947aa084426ed1138bb96bf94d1f12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7fe089232554357efb8d4af65ce209fc6e5a2186", - "reference": "7fe089232554357efb8d4af65ce209fc6e5a2186", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/84ae343f39947aa084426ed1138bb96bf94d1f12", + "reference": "84ae343f39947aa084426ed1138bb96bf94d1f12", "shasum": "" }, "require": { @@ -628,20 +636,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-10-01T21:00:16+00:00" + "time": "2018-07-26T09:03:18+00:00" }, { "name": "symfony/finder", - "version": "v2.8.28", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a945724b201f74d543e356f6059c930bb8d10c92" + "reference": "f0de0b51913eb2caab7dfed6413b87e14fca780e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a945724b201f74d543e356f6059c930bb8d10c92", - "reference": "a945724b201f74d543e356f6059c930bb8d10c92", + "url": "https://api.github.com/repos/symfony/finder/zipball/f0de0b51913eb2caab7dfed6413b87e14fca780e", + "reference": "f0de0b51913eb2caab7dfed6413b87e14fca780e", "shasum": "" }, "require": { @@ -677,20 +685,78 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-10-01T21:00:16+00:00" + "time": "2018-07-26T11:13:39+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "[email protected]" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.6.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", - "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", "shasum": "" }, "require": { @@ -702,7 +768,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -736,20 +802,20 @@ "portable", "shim" ], - "time": "2017-10-11T12:05:26+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/var-dumper", - "version": "v2.8.28", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "3e34c94f44d7bf8db1569b4bcb4b45065ccf388e" + "reference": "4f935cf61c3733ca662628425eac69b38c2bbb4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3e34c94f44d7bf8db1569b4bcb4b45065ccf388e", - "reference": "3e34c94f44d7bf8db1569b4bcb4b45065ccf388e", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/4f935cf61c3733ca662628425eac69b38c2bbb4c", + "reference": "4f935cf61c3733ca662628425eac69b38c2bbb4c", "shasum": "" }, "require": { @@ -804,24 +870,25 @@ "debug", "dump" ], - "time": "2017-09-15T16:59:28+00:00" + "time": "2018-07-26T11:13:39+00:00" }, { "name": "symfony/yaml", - "version": "v2.8.28", + "version": "v2.8.45", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "842fb6df22180244b4c65935ce1a88d324e5ff9e" + "reference": "fbf876678e29dc634430dcf0096e216eb0004467" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/842fb6df22180244b4c65935ce1a88d324e5ff9e", - "reference": "842fb6df22180244b4c65935ce1a88d324e5ff9e", + "url": "https://api.github.com/repos/symfony/yaml/zipball/fbf876678e29dc634430dcf0096e216eb0004467", + "reference": "fbf876678e29dc634430dcf0096e216eb0004467", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.3.9", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { @@ -853,20 +920,20 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-10-05T14:38:30+00:00" + "time": "2018-07-26T09:03:18+00:00" }, { "name": "webmozart/assert", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", "shasum": "" }, "require": { @@ -903,7 +970,7 @@ "check", "validate" ], - "time": "2016-11-23T20:04:58+00:00" + "time": "2018-01-29T19:49:41+00:00" }, { "name": "webmozart/path-util", @@ -1058,33 +1125,33 @@ }, { "name": "phpspec/prophecy", - "version": "v1.7.2", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", - "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -1117,7 +1184,7 @@ "spy", "stub" ], - "time": "2017-09-04T11:05:03+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1183,16 +1250,16 @@ }, { "name": "phpunit/php-file-iterator", - "version": "1.4.2", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -1226,7 +1293,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03T07:40:28+00:00" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -1320,16 +1387,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.4.11", + "version": "1.4.12", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", "shasum": "" }, "require": { @@ -1365,7 +1432,7 @@ "keywords": [ "tokenizer" ], - "time": "2017-02-27T10:12:30+00:00" + "time": "2017-12-04T08:55:13+00:00" }, { "name": "phpunit/phpunit", @@ -1869,16 +1936,16 @@ }, { "name": "symfony/process", - "version": "v2.7.35", + "version": "v2.7.49", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "601b7d86103ae1ad374343725e899f905680f919" + "reference": "df9e3c66fb62a1ee93002e8ec9cd4d831236f494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/601b7d86103ae1ad374343725e899f905680f919", - "reference": "601b7d86103ae1ad374343725e899f905680f919", + "url": "https://api.github.com/repos/symfony/process/zipball/df9e3c66fb62a1ee93002e8ec9cd4d831236f494", + "reference": "df9e3c66fb62a1ee93002e8ec9cd4d831236f494", "shasum": "" }, "require": { @@ -1914,7 +1981,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-09-30T14:00:25+00:00" + "time": "2018-05-15T08:20:41+00:00" } ], "aliases": [], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/drush.info new/drush-8.1.18/drush.info --- old/drush-8.1.17/drush.info 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/drush.info 2018-11-21 23:57:06.000000000 +0100 @@ -1 +1 @@ -drush_version=8.1.17 +drush_version=8.1.18 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/includes/annotationcommand_adapter.inc new/drush-8.1.18/includes/annotationcommand_adapter.inc --- old/drush-8.1.17/includes/annotationcommand_adapter.inc 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/includes/annotationcommand_adapter.inc 2018-11-21 23:57:06.000000000 +0100 @@ -30,6 +30,10 @@ $discovery = new CommandFileDiscovery(); $discovery ->setIncludeFilesAtBase(false) + ->setSearchDepth(3) + ->ignoreNamespacePart('contrib', 'Commands') + ->ignoreNamespacePart('custom', 'Commands') + ->ignoreNamespacePart('src') ->setSearchLocations(['Commands']) ->setSearchPattern('#.*Commands.php$#'); } @@ -231,6 +235,7 @@ $input = new DrushInputAdapter($args, annotationcommand_adapter_get_options($command), $command['command']); $output = new DrushOutputAdapter(); + annotationcommand_adapter_input($input); $annotationData = $command['annotations']; $commandData = new CommandData( $annotationData, @@ -251,6 +256,14 @@ return $result; } +function annotationcommand_adapter_input($setInput = null) { + static $cacheInput = null; + if ($setInput != null) { + $cacheInput = $setInput; + } + return $cacheInput; +} + /** * Internal function called by annotationcommand_adapter_commands, which * is called by drush_get_commands(). @@ -265,11 +278,14 @@ // 'modules/default_content/src/CliTools/DefaultContentCommands.php' => // '\\Drupal\\default_content\\CliTools\\DefaultContentCommands', foreach ($annotation_commandfiles as $commandfile_path => $commandfile_class) { - if (file_exists($commandfile_path)) { - $commandhandler = annotationcommand_adapter_create_commandfile_instance($commandfile_path, $commandfile_class); - $commands_for_this_commandhandler = annotationcommand_adapter_get_commands_for_commandhandler($commandhandler, $commandfile_path); - $commands = array_merge($commands, $commands_for_this_commandhandler); + try { + if (file_exists($commandfile_path) && ($commandfile_class != '\Drush\Commands\DrushCommands')) { + $commandhandler = annotationcommand_adapter_create_commandfile_instance($commandfile_path, $commandfile_class); + $commands_for_this_commandhandler = annotationcommand_adapter_get_commands_for_commandhandler($commandhandler, $commandfile_path); + $commands = array_merge($commands, $commands_for_this_commandhandler); + } } + catch (\Exception $e) {} } return $commands; } @@ -368,6 +384,33 @@ return $commands; } +function annotationcommand_adapter_bootstrap_phase_index($phase) +{ + $phaseMap = annotationcommand_adapter_bootstrap_phase_map(); + if (isset($phaseMap[$phase])) { + return $phaseMap[$phase]; + } + + if ((substr($phase, 0, 16) != 'DRUSH_BOOTSTRAP_') || (!defined($phase))) { + return; + } + return constant($phase); +} + +function annotationcommand_adapter_bootstrap_phase_map() +{ + return [ + 'none' => DRUSH_BOOTSTRAP_NONE, + 'root' => DRUSH_BOOTSTRAP_DRUPAL_ROOT, + 'site' => DRUSH_BOOTSTRAP_DRUPAL_SITE, + 'config' => DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION, + 'configuration' => DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION, + 'db' => DRUSH_BOOTSTRAP_DRUPAL_DATABASE, + 'database' => DRUSH_BOOTSTRAP_DRUPAL_DATABASE, + 'full' => DRUSH_BOOTSTRAP_DRUPAL_FULL, + ]; +} + /** * Convert an annotated command command handler object into a Drush $command record. * @@ -378,6 +421,9 @@ * @return array Drush $command record */ function annotationcommand_adapter_get_commands_for_commandhandler($commandhandler, $commandfile_path, $includeAllPublicMethods = true) { + if (!$commandhandler) { + return []; + } $cache =& drush_get_context('DRUSH_ANNOTATION_COMMANDS_FOR_COMMANDFILE'); if (isset($cache[$commandfile_path])) { return $cache[$commandfile_path]; @@ -401,7 +447,8 @@ $handle_remote_commands = $commandinfo->getAnnotation('handle-remote-commands') == 'true'; // TODO: if there is no 'bootstrap' annotation, maybe we should default to NONE instead of FULL? if ($bootstrap = $commandinfo->getAnnotation('bootstrap')) { - $bootstrap = constant($bootstrap); + // Convert from the bootstrap string to the appropriate bootstrap phase index + $bootstrap = annotationcommand_adapter_bootstrap_phase_index($bootstrap); } $command = [ 'name' => $command_name, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/includes/environment.inc new/drush-8.1.18/includes/environment.inc --- old/drush-8.1.17/includes/environment.inc 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/includes/environment.inc 2018-11-21 23:57:06.000000000 +0100 @@ -17,7 +17,7 @@ * Log PHP errors to the Drush log. This is in effect until Drupal's error * handler takes over. */ -function drush_error_handler($errno, $message, $filename, $line, $context) { +function drush_error_handler($errno, $message, $filename, $line) { // E_DEPRECATED was added in PHP 5.3. Drupal 6 will not fix all the // deprecated errors, but suppresses them. So we suppress them as well. if (defined('E_DEPRECATED')) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/includes/preflight.inc new/drush-8.1.18/includes/preflight.inc --- old/drush-8.1.17/includes/preflight.inc 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/includes/preflight.inc 2018-11-21 23:57:06.000000000 +0100 @@ -441,10 +441,12 @@ if (!($columns = getenv('COLUMNS') ?: 0)) { // Trying to export the columns using stty. exec('stty size 2>&1', $columns_output, $columns_status); - if (!$columns_status) $columns = preg_replace('/\d+\s(\d+)/', '$1', $columns_output[0], -1, $columns_count); - + $matched = FALSE; + if (!$columns_status && $matched = preg_match('/^\d+\s(\d+)$/', $columns_output[0], $matches, 0)) { + $columns = $matches[1]; + } // If stty fails and Drush us running on Windows are we trying with mode con. - if (($columns_status || !$columns_count) && drush_is_windows()) { + if (($columns_status || !$matched) && drush_is_windows()) { $columns_output = array(); exec('mode con', $columns_output, $columns_status); if (!$columns_status && is_array($columns_output)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/includes/sitealias.inc new/drush-8.1.18/includes/sitealias.inc --- old/drush-8.1.17/includes/sitealias.inc 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/includes/sitealias.inc 2018-11-21 23:57:06.000000000 +0100 @@ -1646,7 +1646,7 @@ ); $url = (object)array_map('urldecode', $url); $db_spec = array( - 'driver' => $url->scheme == 'mysqli' ? 'mysql' : $url->scheme, + 'driver' => $url->scheme == 'mysqli' && extension_loaded('mysql') ? 'mysql' : $url->scheme, 'username' => $url->user, 'password' => $url->pass, 'host' => $url->host, @@ -1659,6 +1659,13 @@ return $db_spec; } +function drush_convert_db_url($db_url) { + if (extension_loaded('mysql') && !extension_loaded('mysqli')) { + return preg_replace('#^mysqli://#', 'mysql://', $db_url);; + } + return preg_replace('#^mysql://#', 'mysqli://', $db_url); +} + /** * Convert from an old-style database URL to an array of database settings * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/lib/Drush/Commands/DrushCommands.php new/drush-8.1.18/lib/Drush/Commands/DrushCommands.php --- old/drush-8.1.17/lib/Drush/Commands/DrushCommands.php 1970-01-01 01:00:00.000000000 +0100 +++ new/drush-8.1.18/lib/Drush/Commands/DrushCommands.php 2018-11-21 23:57:06.000000000 +0100 @@ -0,0 +1,93 @@ +<?php +namespace Drush\Commands; + +use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; +use Psr\Log\LoggerInterface; +use Symfony\Component\Console\Input\InputOption; +use Drush\Command\DrushInputAdapter; +use Drush\Command\DrushOutputAdapter; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\OutputInterface; +use Drush\DrushConfig; + +/** + * DrushCommands provides access to configuration, IO and the logger, + * and also provides a "printFile" convenience method for displaying + * the contents of a file with a pager. + * + * Drush extensions that use ONLY the facilities provided by this class, + * plus any APIs provided by Drupal core and the module they are bundled + * with should work with both Drush 8 and Drush 9. + */ +abstract class DrushCommands implements LoggerAwareInterface +{ + // This is more readable. + const REQ=InputOption::VALUE_REQUIRED; + const OPT=InputOption::VALUE_OPTIONAL; + + use LoggerAwareTrait; + + protected $io; + + public function __construct() + { + } + + /** + * Return an object that has the same signature as a Consolidation\Config\ConfigInterface + */ + protected function getConfig() + { + return new DrushConfig(); + } + + /** + * @return SymfonyStyle + */ + protected function io() + { + if (!$this->io) { + $this->io = new SymfonyStyle($this->input(), $this->output()); + } + return $this->io; + } + + /** + * @return InputInterface + */ + protected function input() + { + return annotationcommand_adapter_input(); + } + + /** + * @return OutputInterface + */ + protected function output() + { + return new DrushOutputAdapter(); + } + + /** + * Returns a logger object. + * + * @return LoggerInterface + */ + protected function logger() + { + return $this->logger; + } + + /** + * Print the contents of a file. + * + * @param string $file + * Full path to a file. + */ + protected function printFile($file) + { + drush_print_file($file); + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/lib/Drush/DrushConfig.php new/drush-8.1.18/lib/Drush/DrushConfig.php --- old/drush-8.1.17/lib/Drush/DrushConfig.php 1970-01-01 01:00:00.000000000 +0100 +++ new/drush-8.1.18/lib/Drush/DrushConfig.php 2018-11-21 23:57:06.000000000 +0100 @@ -0,0 +1,94 @@ +<?php +namespace Drush; + +/** + * Provides minimal access to Drush configuration in a way that is + * forward-compatible with the Consolidation\Config classes used + * in Drush 9. + */ +class DrushConfig +{ + /** + * Determine if a non-default config value exists in a non-default context. + */ + public function has($key) + { + $contexts = drush_context_names(); + $contexts = array_filter($contexts, function ($item) { return $item != 'default'; }); + + foreach ($contexts as $context) { + $value = _drush_get_option($option, drush_get_context($context)); + + if ($value !== NULL) { + return true; + } + } + return false; + } + + /** + * Fetch a configuration value + * + * @param string $key Which config item to look up + * @param string|null $default Value to use when $key does not exist + * + * @return mixed + */ + public function get($key, $default = null) + { + return drush_get_option($key, $default); + } + + /** + * Set a config value + * + * @param string $key + * @param mixed $value + * + * @return $this + */ + public function set($key, $value) + { + drush_set_option($key, $value); + } + + /** + * Return the default value for a given configuration item. + * + * @param string $key + * + * @return mixed + */ + public function hasDefault($key) + { + $value = $this->getDefault($key); + return $value != null; + } + + /** + * Return the default value for a given configuration item. + * + * @param string $key + * @param mixed $default + * + * @return mixed + */ + public function getDefault($key, $default = null) + { + return drush_get_option($key, $default, 'default'); + } + + /** + * Set the default value for a configuration setting. This allows us to + * set defaults either before or after more specific configuration values + * are loaded. Keeping defaults separate from current settings also + * allows us to determine when a setting has been overridden. + * + * @param string $key + * @param string $value + */ + public function setDefault($key, $value) + { + drush_set_default($key, $value); + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/lib/Drush/Sql/SqlBase.php new/drush-8.1.18/lib/Drush/Sql/SqlBase.php --- old/drush-8.1.17/lib/Drush/Sql/SqlBase.php 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/lib/Drush/Sql/SqlBase.php 2018-11-21 23:57:06.000000000 +0100 @@ -2,7 +2,6 @@ namespace Drush\Sql; -use Drupal\Core\Database\Database; use Drush\Log\LogLevel; use Webmozart\PathUtil\Path; @@ -201,8 +200,12 @@ if (drush_has_boostrapped(DRUSH_BOOTSTRAP_DRUPAL_DATABASE)) { // Enable prefix processing which can be dangerous so off by default. See http://drupal.org/node/1219850. if (drush_get_option('db-prefix')) { - if (drush_drupal_major_version() >= 7) { - $query = Database::getConnection()->prefixTables($query); + $drupal_major_version = drush_drupal_major_version(); + if ($drupal_major_version >= 8) { + $query = \Drupal\Core\Database\Database::getConnection()->prefixTables($query); + } + elseif ($drupal_major_version == 7) { + $query = \Database::getConnection()->prefixTables($query); } else { $query = db_prefix_tables($query); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/lib/Drush/Sql/Sqlmysqli.php new/drush-8.1.18/lib/Drush/Sql/Sqlmysqli.php --- old/drush-8.1.17/lib/Drush/Sql/Sqlmysqli.php 1970-01-01 01:00:00.000000000 +0100 +++ new/drush-8.1.18/lib/Drush/Sql/Sqlmysqli.php 2018-11-21 23:57:06.000000000 +0100 @@ -0,0 +1,7 @@ +<?php + +namespace Drush\Sql; + +class Sqlmysqli extends Sqlmysql { + +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/lib/Drush/Sql/Sqlpgsql.php new/drush-8.1.18/lib/Drush/Sql/Sqlpgsql.php --- old/drush-8.1.17/lib/Drush/Sql/Sqlpgsql.php 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/lib/Drush/Sql/Sqlpgsql.php 2018-11-21 23:57:06.000000000 +0100 @@ -121,7 +121,7 @@ if (isset($data_only)) { $extra .= ' --data-only'; } - if ($option = drush_get_option('extra', $this->query_extra)) { + if ($option = drush_get_option('extra')) { $extra .= " $option"; } $exec .= $extra; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/tests/Unish/UnishTestCase.php new/drush-8.1.18/tests/Unish/UnishTestCase.php --- old/drush-8.1.17/tests/Unish/UnishTestCase.php 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/tests/Unish/UnishTestCase.php 2018-11-21 23:57:06.000000000 +0100 @@ -347,6 +347,11 @@ } // Download Drupal if not already present. + if (!file_exists($root) && (substr($version_string, 0, 1) == 6)) { + if (!$this->downloadDrupal6($version_string, $root)) { + $this->markTestSkipped("Could not download d6lts."); + } + } if (!file_exists($root)) { $options += array( 'destination' => dirname($root), @@ -372,6 +377,7 @@ $this->drush('site-install', array($profile), $options); // Give us our write perms back. chmod($site, 0777); + chmod("$site/settings.php", 0777); } else { @mkdir($site); @@ -379,6 +385,48 @@ } } + // pm-download cannot download from d6lts, so we will rough in our own download function + function downloadDrupal6($drupal_6_test_version, $root) { + if (($drupal_6_test_version == '6') || ($drupal_6_test_version == '6.x')) { + $drupal_6_test_version = '6.46'; + } + return $this->downloadFromGitHub('d6lts/drupal', $drupal_6_test_version, $root, "drupal-$drupal_6_test_version"); + } + + function downloadFromGitHub($project, $version, $target, $rootDirToRemove = '') { + $url = "https://github.com/{$project}/archive/{$version}.zip"; + $tarPath = dirname($target) . '/' . basename($url); + if (!$this->cachedDownload($url, $tarPath)) { + return false; + } + $zipDir = $target; + if (!empty($rootDirToRemove)) { + $zipDir = dirname($zipDir); + } + passthru("unzip -od $zipDir $tarPath >/dev/null 2>&1", $status); + if ($status != 0) { + return false; + } + if (!empty($rootDirToRemove)) { + rename("$zipDir/$rootDirToRemove", $zipDir . '/' . basename($target)); + } + return file_exists($target); + } + + function cachedDownload($url, $target) { + $dlCacheDir = $this->directory_cache('dl'); + @mkdir($dlCacheDir); + $cacheFile = $dlCacheDir . '/' . basename($target); + if (!file_exists($cacheFile)) { + passthru("curl -L --output $cacheFile $url >/dev/null 2>&1", $status); + if ($status != 0) { + return false; + } + } + copy($cacheFile, $target); + return file_exists($target); + } + function writeSiteAlias($name, $root, $uri) { $alias_definition = array($name => array('root' => $root, 'uri' => $uri)); file_put_contents(UNISH_SANDBOX . '/etc/drush/' . $name . '.alias.drushrc.php', $this->unish_file_aliases($alias_definition)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/tests/bootstrap.inc new/drush-8.1.18/tests/bootstrap.inc --- old/drush-8.1.17/tests/bootstrap.inc 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/tests/bootstrap.inc 2018-11-21 23:57:06.000000000 +0100 @@ -50,6 +50,9 @@ elseif (isset($GLOBALS['UNISH_DB_URL'])) { $unish_db_url = $GLOBALS['UNISH_DB_URL']; } + if (UNISH_DRUPAL_MAJOR_VERSION == '6') { + $unish_db_url = preg_replace('#^mysql://#', 'mysqli://', $unish_db_url); + } define('UNISH_DB_URL', $unish_db_url); // UNISH_DRUSH value can come from phpunit.xml. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/tests/generateMakeTest.php new/drush-8.1.18/tests/generateMakeTest.php --- old/drush-8.1.17/tests/generateMakeTest.php 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/tests/generateMakeTest.php 2018-11-21 23:57:06.000000000 +0100 @@ -27,6 +27,9 @@ } function _testGenerateMake($module, $theme) { + if (UNISH_DRUPAL_MAJOR_VERSION != '7') { + $this->markTestSkipped("Drush generate make tests depend on projects not available on older and newer versions of Drupal. Tests need updating, but Drush make is deprecated; Composer is recommended."); + } $sites = $this->setUpDrupal(1, TRUE); $major_version = UNISH_DRUPAL_MAJOR_VERSION . '.x'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/tests/pmDownloadTest.php new/drush-8.1.18/tests/pmDownloadTest.php --- old/drush-8.1.17/tests/pmDownloadTest.php 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/tests/pmDownloadTest.php 2018-11-21 23:57:06.000000000 +0100 @@ -68,7 +68,7 @@ ) + $devel_options; $this->drush('pm-download', array('devel'), $options); $this->assertFileExists(UNISH_SANDBOX . '/' . $destination . '/devel/README.txt'); -} + } public function testSelect() { $options = array( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/tests/pmUpdateCodeTest.php new/drush-8.1.18/tests/pmUpdateCodeTest.php --- old/drush-8.1.17/tests/pmUpdateCodeTest.php 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/tests/pmUpdateCodeTest.php 2018-11-21 23:57:06.000000000 +0100 @@ -49,9 +49,7 @@ $this->modules = array('menu', 'devel', 'webform'); } else { - $core = '6.28'; - $modules_str = 'devel-6.x-1.26,webform-6.x-3.18'; - $this->modules = array('menu', 'devel', 'webform'); + $this->markTestSkipped("pm-update* no longer supported with Drupal 6; drupal.org does not allow stable releases for Drupal 6 contrib modules."); } $sites = $this->setUpDrupal(1, TRUE, $core); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/tests/pmUpdateStatusTest.php new/drush-8.1.18/tests/pmUpdateStatusTest.php --- old/drush-8.1.17/tests/pmUpdateStatusTest.php 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/tests/pmUpdateStatusTest.php 2018-11-21 23:57:06.000000000 +0100 @@ -28,6 +28,10 @@ * - Drupal 8 still has not enough variety to cover the tests */ function setUp() { + if (UNISH_DRUPAL_MAJOR_VERSION == '6') { + $this->markTestSkipped("pm-update* no longer supported with Drupal 6; drupal.org does not allow stable releases for Drupal 6 contrib modules."); + } + $sites = $this->setUpDrupal(1, TRUE, "7.30"); $options = array( 'root' => $this->webroot(), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.1.17/tests/testChildren.sh new/drush-8.1.18/tests/testChildren.sh --- old/drush-8.1.17/tests/testChildren.sh 2018-05-23 18:58:54.000000000 +0200 +++ new/drush-8.1.18/tests/testChildren.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -# See https://github.com/drush-ops/drush/pull/1426 for background information. -# -# $AUTH_TOKEN is provided via a secure Travis environment variable. -# Secure environment variables are not set for pull requests that -# originated from another repository, so skip child tests if $AUTH_TOKEN -# is empty. -if [ -n "$AUTH_TOKEN" ] -then - # After a travis build succeeds, run tests from any child repository defined in $TEST_CHILDREN - for CHILD in $TEST_CHILDREN - do - BUILD_NUM=$(curl -s "https://api.travis-ci.org/repos/$CHILD/builds" | grep -o '^\[{"id":[0-9]*,' | grep -o '[0-9]' | tr -d '\n') - echo "Restarting build $BUILD_NUM for $CHILD" - curl -X POST https://api.travis-ci.org/builds/$BUILD_NUM/restart --header "Authorization: token "$AUTH_TOKEN - done -fi ++++++ drush-vendor.tar.xz ++++++ ++++ 73695 lines of diff (skipped) ++++++ extensions.txt ++++++ --- /var/tmp/diff_new_pack.ioa5Hq/_old 2018-11-22 13:27:27.373878922 +0100 +++ /var/tmp/diff_new_pack.ioa5Hq/_new 2018-11-22 13:27:27.377878918 +0100 @@ -2,38 +2,42 @@ ( [requires] => Array ( - [0] => ext-tokenizer * - [1] => php >=5.2.0 - [2] => php >=5.3.0 - [3] => php >=5.3.0 - [4] => php >=5.3.2 - [5] => php >=5.3.2 - [6] => php >=5.3.3 - [7] => php >=5.3.3 - [8] => php >=5.3.9 - [9] => php >=5.3.9 - [10] => php >=5.3.9 + [0] => ext-json * + [1] => ext-tokenizer * + [2] => ext-tokenizer * + [3] => php >=5.2.0 + [4] => php >=5.3.0 + [5] => php >=5.3.0 + [6] => php >=5.3.2 + [7] => php >=5.3.2 + [8] => php >=5.3.3 + [9] => php >=5.3.3 + [10] => php >=5.3.3 [11] => php >=5.3.9 [12] => php >=5.3.9 [13] => php >=5.3.9 [14] => php >=5.3.9 - [15] => php >=5.4 - [16] => php >=5.4.0 - [17] => php >=5.4.0 - [18] => php >=5.4.5 - [19] => php ^5.3.3 || ^7.0 + [15] => php >=5.3.9 + [16] => php >=5.3.9 + [17] => php >=5.4 + [18] => php >=5.4.0 + [19] => php >=5.4.0 + [20] => php >=5.4.0 + [21] => php >=5.4.5 + [22] => php ^5.3.3 || ^7.0 ) [suggests] => Array ( - [0] => ext-iconv To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used). - [1] => ext-mbstring For best performance - [2] => ext-pcntl * - [3] => ext-pcntl Enabling the PCNTL extension makes PsySH a lot happier :) - [4] => ext-pdo-sqlite The doc command requires SQLite to work. - [5] => ext-posix If you have PCNTL, you'll want the POSIX extension as well. - [6] => ext-readline Enables support for arrow-key history navigation, and showing and manipulating command history. - [7] => ext-symfony_debug + [0] => ext-ctype For best performance + [1] => ext-iconv To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used). + [2] => ext-mbstring For best performance + [3] => ext-pcntl * + [4] => ext-pcntl Enabling the PCNTL extension makes PsySH a lot happier :) + [5] => ext-pdo-sqlite The doc command requires SQLite to work. + [6] => ext-posix If you have PCNTL, you'll want the POSIX extension as well. + [7] => ext-readline Enables support for arrow-key history navigation, and showing and manipulating command history. + [8] => ext-symfony_debug ) ) ++++++ licenses.txt ++++++ --- /var/tmp/diff_new_pack.ioa5Hq/_old 2018-11-22 13:27:27.389878906 +0100 +++ /var/tmp/diff_new_pack.ioa5Hq/_new 2018-11-22 13:27:27.389878906 +0100 @@ -4,21 +4,22 @@ Dependencies: Name Version License -consolidation/annotated-command 2.8.1 MIT -consolidation/output-formatters 3.1.12 MIT +consolidation/annotated-command 2.9.1 MIT +consolidation/output-formatters 3.2.1 MIT dnoegel/php-xdg-base-dir 0.1 MIT jakub-onderka/php-console-color 0.1 BSD-2-Clause jakub-onderka/php-console-highlighter v0.3.2 MIT nikic/php-parser v2.1.1 BSD-3-Clause pear/console_table v1.3.1 BSD-2-Clause psr/log 1.0.2 MIT -psy/psysh v0.8.14 MIT -symfony/console v2.8.28 MIT -symfony/debug v2.8.28 MIT -symfony/event-dispatcher v2.8.28 MIT -symfony/finder v2.8.28 MIT -symfony/polyfill-mbstring v1.6.0 MIT -symfony/var-dumper v2.8.28 MIT -symfony/yaml v2.8.28 MIT -webmozart/assert 1.2.0 MIT +psy/psysh v0.9.8 MIT +symfony/console v2.8.45 MIT +symfony/debug v2.8.45 MIT +symfony/event-dispatcher v2.8.45 MIT +symfony/finder v2.8.45 MIT +symfony/polyfill-ctype v1.9.0 MIT +symfony/polyfill-mbstring v1.9.0 MIT +symfony/var-dumper v2.8.45 MIT +symfony/yaml v2.8.45 MIT +webmozart/assert 1.3.0 MIT webmozart/path-util 2.3.0 MIT
