Hello community, here is the log from the commit of package drush for openSUSE:Factory checked in at 2019-03-15 10:52:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/drush (Old) and /work/SRC/openSUSE:Factory/.drush.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "drush" Fri Mar 15 10:52:31 2019 rev:10 rq:685178 version:8.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/drush/drush.changes 2019-03-12 09:56:04.907506161 +0100 +++ /work/SRC/openSUSE:Factory/.drush.new.28833/drush.changes 2019-03-15 10:52:46.728963740 +0100 @@ -1,0 +2,12 @@ +Thu Mar 14 14:05:41 UTC 2019 - ji...@boombatower.com + +- Update to version 8.2.1: + * Prep for 8.2.1 + * Fix $this being used in a static context in Drush.php. (#3994) + * Fix backported command aliases: some that had too many ':'s should have been using '-'s instead. (#3991) + * Fixes #3988: Move code to get version directly to the static access methods in case someone (e.g. a module) calls them directly. (#3990) + * Update composer.lock + * Bump minimum version of consolidation/annotated-command + * Back to dev + +------------------------------------------------------------------- Old: ---- drush-8.2.0.tar.xz New: ---- drush-8.2.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ drush.spec ++++++ --- /var/tmp/diff_new_pack.crBBgq/_old 2019-03-15 10:52:48.508963280 +0100 +++ /var/tmp/diff_new_pack.crBBgq/_new 2019-03-15 10:52:48.508963280 +0100 @@ -17,7 +17,7 @@ Name: drush -Version: 8.2.0 +Version: 8.2.1 Release: 0 Summary: Command line shell and scripting interface for Drupal # See licenses.txt for dependency licenses. ++++++ _service ++++++ --- /var/tmp/diff_new_pack.crBBgq/_old 2019-03-15 10:52:48.532963274 +0100 +++ /var/tmp/diff_new_pack.crBBgq/_new 2019-03-15 10:52:48.532963274 +0100 @@ -1,7 +1,7 @@ <services> <service name="tar_scm" mode="disabled"> <param name="versionformat">@PARENT_TAG@</param> - <param name="revision">refs/tags/8.2.0</param> + <param name="revision">refs/tags/8.2.1</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.crBBgq/_old 2019-03-15 10:52:48.544963271 +0100 +++ /var/tmp/diff_new_pack.crBBgq/_new 2019-03-15 10:52:48.544963271 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/drush-ops/drush.git</param> - <param name="changesrevision">7d76d775a085ffd4076391aec4234cff80a7559b</param> + <param name="changesrevision">76b4cf0e7ced91790b9c9a7053fa3e9f04fc69e3</param> </service> </servicedata> ++++++ drush-8.2.0.tar.xz -> drush-8.2.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.2.0/commands/core/core.drush.inc new/drush-8.2.1/commands/core/core.drush.inc --- old/drush-8.2.0/commands/core/core.drush.inc 2019-03-11 06:01:39.000000000 +0100 +++ new/drush-8.2.1/commands/core/core.drush.inc 2019-03-14 04:57:03.000000000 +0100 @@ -340,7 +340,7 @@ // Drupal 7 needs DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION, while Drupal 8 needs _FULL. // Therefore we bootstrap to _FULL in commands/core/drupal/update.inc. 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION, - 'aliases' => array('updatedb:batch:process'), + 'aliases' => array('updatedb:batch-process'), ); $items['core-global-options'] = array( 'description' => 'All global options', @@ -353,7 +353,7 @@ 'field-labels' => array('label' => 'Label', 'description' => 'Description'), 'output-data-type' => 'format-table', ), - 'aliases' => array('core:global:options'), + 'aliases' => array('core:global-options'), ); $items['core-quick-drupal'] = array( 'description' => 'Download, install, serve and login to Drupal with minimal configuration and dependencies.', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.2.0/commands/core/docs.drush.inc new/drush-8.2.1/commands/core/docs.drush.inc --- old/drush-8.2.0/commands/core/docs.drush.inc 2019-03-11 06:01:39.000000000 +0100 +++ new/drush-8.2.1/commands/core/docs.drush.inc 2019-03-14 04:57:03.000000000 +0100 @@ -94,7 +94,7 @@ 'bootstrap' => DRUSH_BOOTSTRAP_NONE, 'callback' => 'drush_print_file', 'callback arguments' => array($docs_dir . '/examples/example.drush.ini'), - 'aliases' => array('docs:ini:files'), + 'aliases' => array('docs:ini-files'), ); $items['docs-bastion'] = array( 'description' => 'Bastion server configuration: remotely operate on a Drupal sites behind a firewall.', @@ -139,7 +139,7 @@ 'bootstrap' => DRUSH_BOOTSTRAP_NONE, 'callback' => 'drush_print_file', 'callback arguments' => array($docs_dir . '/docs/shellaliases.md'), - 'aliases' => array('docs:shell:aliases'), + 'aliases' => array('docs:shell-aliases'), ); $items['docs-commands'] = array( 'description' => 'Drush command instructions on creating your own Drush commands.', @@ -200,7 +200,7 @@ 'bootstrap' => DRUSH_BOOTSTRAP_NONE, 'callback' => 'drush_print_file', 'callback arguments' => array($docs_dir . '/examples/sync_enable.drush.inc'), - 'aliases' => array('docs:example:sync:extension'), + 'aliases' => array('docs:example-sync-extension'), ); $items['docs-example-sync-via-http'] = array( 'description' => 'Example Drush commandfile that extends sql-sync to allow transfer of the sql dump file via http rather than ssh and rsync.', @@ -209,7 +209,7 @@ 'bootstrap' => DRUSH_BOOTSTRAP_NONE, 'callback' => 'drush_print_file', 'callback arguments' => array($docs_dir . '/examples/sync_via_http.drush.inc'), - 'aliases' => array('docs:example:sync:via:http'), + 'aliases' => array('docs:example-sync-via-http'), ); $items['docs-policy'] = array( 'description' => 'Example policy file.', @@ -227,7 +227,7 @@ 'bootstrap' => DRUSH_BOOTSTRAP_NONE, 'callback' => 'drush_print_file', 'callback arguments' => array($docs_dir . '/docs/strict-options.md'), - 'aliases' => array('docs:strict:options'), + 'aliases' => array('docs:strict-options'), ); return $items; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.2.0/composer.json new/drush-8.2.1/composer.json --- old/drush-8.2.0/composer.json 2019-03-11 06:01:39.000000000 +0100 +++ new/drush-8.2.1/composer.json 2019-03-14 04:57:03.000000000 +0100 @@ -36,7 +36,7 @@ "php": ">=5.4.5", "psr/log": "~1.0", "psy/psysh": "~0.6", - "consolidation/annotated-command": "^2.9.1", + "consolidation/annotated-command": "^2.12.0", "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.2.0/composer.lock new/drush-8.2.1/composer.lock --- old/drush-8.2.0/composer.lock 2019-03-11 06:01:39.000000000 +0100 +++ new/drush-8.2.1/composer.lock 2019-03-14 04:57:03.000000000 +0100 @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b586d3e252cb4a6b97d84963a87ec90b", + "content-hash": "6350957e1c82365d6a7199dd8d1289b1", "packages": [ { "name": "consolidation/annotated-command", - "version": "2.11.2", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "004af26391cd7d1cd04b0ac736dc1324d1b4f572" + "reference": "512a2e54c98f3af377589de76c43b24652bcb789" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/004af26391cd7d1cd04b0ac736dc1324d1b4f572", - "reference": "004af26391cd7d1cd04b0ac736dc1324d1b4f572", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/512a2e54c98f3af377589de76c43b24652bcb789", + "reference": "512a2e54c98f3af377589de76c43b24652bcb789", "shasum": "" }, "require": { @@ -100,7 +100,7 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2019-02-02T02:29:53+00:00" + "time": "2019-03-08T16:55:03+00:00" }, { "name": "consolidation/output-formatters", @@ -1703,6 +1703,7 @@ "mock", "xunit" ], + "abandoned": true, "time": "2015-10-02T06:51:40+00:00" }, { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.2.0/drush.info new/drush-8.2.1/drush.info --- old/drush-8.2.0/drush.info 2019-03-11 06:01:39.000000000 +0100 +++ new/drush-8.2.1/drush.info 2019-03-14 04:57:03.000000000 +0100 @@ -1 +1 @@ -drush_version=8.2.0 +drush_version=8.2.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.2.0/includes/environment.inc new/drush-8.2.1/includes/environment.inc --- old/drush-8.2.0/includes/environment.inc 2019-03-11 06:01:39.000000000 +0100 +++ new/drush-8.2.1/includes/environment.inc 2019-03-14 04:57:03.000000000 +0100 @@ -10,6 +10,7 @@ * @see includes/bootstrap.inc */ +use Drush\Drush; use Drush\Log\LogLevel; use Webmozart\PathUtil\Path; @@ -612,9 +613,7 @@ * Read the drush info file. */ function drush_read_drush_info() { - $drush_info_file = dirname(__FILE__) . '/../drush.info'; - - return parse_ini_file($drush_info_file); + return Drush::ReadDrushInfo(); } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.2.0/includes/preflight.inc new/drush-8.2.1/includes/preflight.inc --- old/drush-8.2.0/includes/preflight.inc 2019-03-11 06:01:39.000000000 +0100 +++ new/drush-8.2.1/includes/preflight.inc 2019-03-14 04:57:03.000000000 +0100 @@ -5,6 +5,7 @@ * Preflight, postflight and shutdown code. */ +use Drush\Drush; use Drush\Log\LogLevel; /** @@ -169,11 +170,10 @@ return; // An error was logged. } - $drush_info = drush_read_drush_info(); - define('DRUSH_VERSION', $drush_info['drush_version']); - $version_parts = explode('.', DRUSH_VERSION); - define('DRUSH_MAJOR_VERSION', $version_parts[0]); - define('DRUSH_MINOR_VERSION', $version_parts[1]); + // For backwards compatibility. Prefer the static accessors. + define('DRUSH_VERSION', Drush::getVersion()); + define('DRUSH_MAJOR_VERSION', Drush::getMajorVersion()); + define('DRUSH_MINOR_VERSION', Drush::getMinorVersion()); define('DRUSH_REQUEST_TIME', microtime(TRUE)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drush-8.2.0/lib/Drush/Drush.php new/drush-8.2.1/lib/Drush/Drush.php --- old/drush-8.2.0/lib/Drush/Drush.php 2019-03-11 06:01:39.000000000 +0100 +++ new/drush-8.2.1/lib/Drush/Drush.php 2019-03-14 04:57:03.000000000 +0100 @@ -39,6 +39,9 @@ protected static $processManager = null; protected static $input = null; protected static $output = null; + protected static $drushVersion = null; + protected static $drushMajorVersion = null; + protected static $drushMinorVersion = null; /** * Number of seconds before timeout for subprocesses. Can be customized via setTimeout() method. @@ -60,17 +63,49 @@ */ public static function getVersion() { - return DRUSH_VERSION; + if (!isset(self::$drushVersion)) { + $drush_info = self::ReadDrushInfo(); + self::$drushVersion = $drush_info['drush_version']; + } + + return self::$drushVersion; } + /** + * Return the Drush major version, e.g. 8, 9 or 10 + */ public static function getMajorVersion() { - return DRUSH_MAJOR_VERSION; + if (!isset(self::$drushMajorVersion)) { + $version_parts = explode('.', self::getVersion()); + self::$drushMajorVersion = $version_parts[0]; + } + + return self::$drushMajorVersion; } + /** + * Return the Drush minor version, e.g. the minor version of + * Drush 9.5.2 is "5". + */ public static function getMinorVersion() { - return DRUSH_MINOR_VERSION; + if (!isset(self::$drushMinorVersion)) { + $version_parts = explode('.', self::getVersion()); + self::$drushMinorVersion = $version_parts[1]; + } + + return self::$drushMinorVersion; + } + + /** + * Read the drush info file. + */ + public static function ReadDrushInfo() + { + $drush_info_file = dirname(dirname(__DIR__)) . '/drush.info'; + + return parse_ini_file($drush_info_file); } // public static function setContainer(ContainerInterface $container) @@ -245,7 +280,7 @@ */ public static function drush(SiteAliasInterface $siteAlias, $command, $args = [], $options = [], $options_double_dash = []) { - return $this->processManager()->drush($siteAlias, $command, $args, $options, $options_double_dash); + return static::processManager()->drush($siteAlias, $command, $args, $options, $options_double_dash); } /** @@ -262,7 +297,7 @@ */ public static function siteProcess(SiteAliasInterface $siteAlias, $args = [], $options = [], $options_double_dash = []) { - return $this->processManager()->siteProcess($siteAlias, $args, $options, $options_double_dash); + return static::processManager()->siteProcess($siteAlias, $args, $options, $options_double_dash); } /** @@ -285,7 +320,7 @@ */ public static function process($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60) { - return $this->processManager()->process($commandline, $cwd, $env, $input, $timeout); + return static::processManager()->process($commandline, $cwd, $env, $input, $timeout); } /** @@ -302,7 +337,7 @@ */ public static function shell($command, $cwd = null, array $env = null, $input = null, $timeout = 60) { - return $this->processManager()->shell($command, $cwd, $env, $input, $timeout); + return static::processManager()->shell($command, $cwd, $env, $input, $timeout); } /** ++++++ drush-vendor.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/autoload.php new/vendor/autoload.php --- old/vendor/autoload.php 2019-03-12 01:31:40.207029137 +0100 +++ new/vendor/autoload.php 2019-03-14 15:05:45.860362979 +0100 @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitfd24356edce4bd145b5cb4f6e88c37b7::getLoader(); +return ComposerAutoloaderInit041e5bc9c93c855c2ca1f058035feccd::getLoader(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/composer/autoload_real.php new/vendor/composer/autoload_real.php --- old/vendor/composer/autoload_real.php 2019-03-12 01:31:40.207029137 +0100 +++ new/vendor/composer/autoload_real.php 2019-03-14 15:05:45.860362979 +0100 @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitfd24356edce4bd145b5cb4f6e88c37b7 +class ComposerAutoloaderInit041e5bc9c93c855c2ca1f058035feccd { private static $loader; @@ -19,15 +19,15 @@ return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitfd24356edce4bd145b5cb4f6e88c37b7', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit041e5bc9c93c855c2ca1f058035feccd', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitfd24356edce4bd145b5cb4f6e88c37b7', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit041e5bc9c93c855c2ca1f058035feccd', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitfd24356edce4bd145b5cb4f6e88c37b7::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit041e5bc9c93c855c2ca1f058035feccd::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -48,19 +48,19 @@ $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInitfd24356edce4bd145b5cb4f6e88c37b7::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit041e5bc9c93c855c2ca1f058035feccd::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequirefd24356edce4bd145b5cb4f6e88c37b7($fileIdentifier, $file); + composerRequire041e5bc9c93c855c2ca1f058035feccd($fileIdentifier, $file); } return $loader; } } -function composerRequirefd24356edce4bd145b5cb4f6e88c37b7($fileIdentifier, $file) +function composerRequire041e5bc9c93c855c2ca1f058035feccd($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/composer/autoload_static.php new/vendor/composer/autoload_static.php --- old/vendor/composer/autoload_static.php 2019-03-12 01:31:40.207029137 +0100 +++ new/vendor/composer/autoload_static.php 2019-03-14 15:05:45.860362979 +0100 @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitfd24356edce4bd145b5cb4f6e88c37b7 +class ComposerStaticInit041e5bc9c93c855c2ca1f058035feccd { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', @@ -156,10 +156,10 @@ public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitfd24356edce4bd145b5cb4f6e88c37b7::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitfd24356edce4bd145b5cb4f6e88c37b7::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInitfd24356edce4bd145b5cb4f6e88c37b7::$prefixesPsr0; - $loader->classMap = ComposerStaticInitfd24356edce4bd145b5cb4f6e88c37b7::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit041e5bc9c93c855c2ca1f058035feccd::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit041e5bc9c93c855c2ca1f058035feccd::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit041e5bc9c93c855c2ca1f058035feccd::$prefixesPsr0; + $loader->classMap = ComposerStaticInit041e5bc9c93c855c2ca1f058035feccd::$classMap; }, null, ClassLoader::class); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/composer/installed.json new/vendor/composer/installed.json --- old/vendor/composer/installed.json 2019-03-12 01:31:39.755025184 +0100 +++ new/vendor/composer/installed.json 2019-03-14 15:05:45.316358253 +0100 @@ -1,17 +1,17 @@ [ { "name": "consolidation/annotated-command", - "version": "2.11.2", - "version_normalized": "2.11.2.0", + "version": "2.12.0", + "version_normalized": "2.12.0.0", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "004af26391cd7d1cd04b0ac736dc1324d1b4f572" + "reference": "512a2e54c98f3af377589de76c43b24652bcb789" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/004af26391cd7d1cd04b0ac736dc1324d1b4f572", - "reference": "004af26391cd7d1cd04b0ac736dc1324d1b4f572", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/512a2e54c98f3af377589de76c43b24652bcb789", + "reference": "512a2e54c98f3af377589de76c43b24652bcb789", "shasum": "" }, "require": { @@ -28,7 +28,7 @@ "phpunit/phpunit": "^6", "squizlabs/php_codesniffer": "^2.7" }, - "time": "2019-02-02T02:29:53+00:00", + "time": "2019-03-08T16:55:03+00:00", "type": "library", "extra": { "scenarios": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/consolidation/annotated-command/CHANGELOG.md new/vendor/consolidation/annotated-command/CHANGELOG.md --- old/vendor/consolidation/annotated-command/CHANGELOG.md 2019-02-02 03:29:53.000000000 +0100 +++ new/vendor/consolidation/annotated-command/CHANGELOG.md 2019-03-08 17:55:03.000000000 +0100 @@ -1,5 +1,9 @@ # Change Log +### 2.12.0 - 8 Mar 2019 + +- Allow annotated args and options to specify their default values in their descriptions. (#186) + ### 2.11.2 - 1 Feb 2019 - Fix handling of old caches from 2.11.1 that introduced upgrade errors. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/consolidation/annotated-command/src/Parser/Internal/BespokeDocBlockParser.php new/vendor/consolidation/annotated-command/src/Parser/Internal/BespokeDocBlockParser.php --- old/vendor/consolidation/annotated-command/src/Parser/Internal/BespokeDocBlockParser.php 2019-02-02 03:29:53.000000000 +0100 +++ new/vendor/consolidation/annotated-command/src/Parser/Internal/BespokeDocBlockParser.php 2019-03-08 17:55:03.000000000 +0100 @@ -137,7 +137,20 @@ { $variableName = $this->commandInfo->findMatchingOption($name); $description = static::removeLineBreaks($description); + list($description, $defaultValue) = $this->splitOutDefault($description); $set->add($variableName, $description); + if ($defaultValue !== null) { + $set->setDefaultValue($variableName, $defaultValue); + } + } + + protected function splitOutDefault($description) + { + if (!preg_match('#(.*)(Default: *)(.*)#', trim($description), $matches)) { + return [$description, null]; + } + + return [trim($matches[1]), $this->interpretDefaultValue(trim($matches[3]))]; } /** ++++++ licenses.txt ++++++ --- /var/tmp/diff_new_pack.crBBgq/_old 2019-03-15 10:52:49.460963034 +0100 +++ /var/tmp/diff_new_pack.crBBgq/_new 2019-03-15 10:52:49.460963034 +0100 @@ -4,7 +4,7 @@ Dependencies: Name Version License -consolidation/annotated-command 2.11.2 MIT +consolidation/annotated-command 2.12.0 MIT consolidation/output-formatters 3.4.0 MIT dflydev/dot-access-data v1.1.0 MIT dnoegel/php-xdg-base-dir 0.1 MIT