Hello community,

here is the log from the commit of package platformsh-cli for openSUSE:Factory 
checked in at 2017-12-14 11:03:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/platformsh-cli (Old)
 and      /work/SRC/openSUSE:Factory/.platformsh-cli.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "platformsh-cli"

Thu Dec 14 11:03:43 2017 rev:27 rq:556821 version:3.25.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/platformsh-cli/platformsh-cli.changes    
2017-12-08 13:02:00.951656957 +0100
+++ /work/SRC/openSUSE:Factory/.platformsh-cli.new/platformsh-cli.changes       
2017-12-14 11:03:46.501390931 +0100
@@ -1,0 +2,27 @@
+Wed Dec 13 21:17:52 UTC 2017 - [email protected]
+
+- Update to version 3.25.0:
+  * Rebuild v3.25.0
+  * Remove var_dump()s
+  * Release v3.25.0
+  * Fix keychain app ID, and put whole feature behind a use_keychain flag
+  * Add CHANGELOG.md
+  * Save session data in the keychain on OS X (#663)
+  * Clean up
+  * Accept projects not in the user's list in multi command
+  * Expose redis relationship/URL explicitly
+  * Extended interactive question text
+  * Omit non-required empty fields when adding an integration
+  * Add --no-expired and --only-expired options to certificate:list
+  * Ignore host in configured project not found message
+  * Implement is_enabled on environment variables
+  * Use getenv() in Config
+  * Comments on DrushAlias
+  * Unused import
+  * Better 'project not found' message
+  * Add redis command
+  * Always inherit from the entire environment in PHP 7.1+
+  * Add SSH_AGENT_PID to auto inherited environment variables
+  * Add release notes for v3.24.0
+
+-------------------------------------------------------------------

Old:
----
  platformsh-cli-3.24.1.tar.xz

New:
----
  platformsh-cli-3.25.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ platformsh-cli.spec ++++++
--- /var/tmp/diff_new_pack.R73pJH/_old  2017-12-14 11:03:47.305352120 +0100
+++ /var/tmp/diff_new_pack.R73pJH/_new  2017-12-14 11:03:47.309351927 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           platformsh-cli
-Version:        3.24.1
+Version:        3.25.0
 Release:        0
 Summary:        Tool for managing Platform.sh services from the command line
 # See licenses.txt for dependency licenses.

++++++ _service ++++++
--- /var/tmp/diff_new_pack.R73pJH/_old  2017-12-14 11:03:47.349349996 +0100
+++ /var/tmp/diff_new_pack.R73pJH/_new  2017-12-14 11:03:47.349349996 +0100
@@ -2,7 +2,7 @@
   <service name="tar_scm" mode="disabled">
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="versionrewrite-pattern">v(.*)</param>
-    <param name="revision">refs/tags/v3.24.1</param>
+    <param name="revision">refs/tags/v3.25.0</param>
     <param name="url">git://github.com/platformsh/platformsh-cli.git</param>
     <param name="scm">git</param>
     <param name="changesgenerate">enable</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.R73pJH/_old  2017-12-14 11:03:47.373348837 +0100
+++ /var/tmp/diff_new_pack.R73pJH/_new  2017-12-14 11:03:47.373348837 +0100
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">git://github.com/platformsh/platformsh-cli.git</param>
-    <param 
name="changesrevision">3f199ea22a08a78ede92682833ee62c14f714461</param>
+    <param 
name="changesrevision">ee6d5d8c61a07793a2362a882c02ab5cc04ec042</param>
   </service>
 </servicedata>

++++++ licenses.txt ++++++
--- /var/tmp/diff_new_pack.R73pJH/_old  2017-12-14 11:03:47.425346327 +0100
+++ /var/tmp/diff_new_pack.R73pJH/_new  2017-12-14 11:03:47.429346134 +0100
@@ -6,7 +6,7 @@
 Name                                Version  License       
 cocur/slugify                       v2.5     MIT           
 commerceguys/guzzle-oauth2-plugin   v2.1.1   MIT           
-cweagans/composer-patches           1.6.3    BSD-2-Clause  
+cweagans/composer-patches           1.6.4    BSD-2-Clause  
 doctrine/cache                      v1.6.2   MIT           
 firebase/php-jwt                    v2.2.0   BSD-3-Clause  
 guzzlehttp/cache-subscriber         0.1.0    MIT           
@@ -15,8 +15,8 @@
 guzzlehttp/streams                  3.0.0    MIT           
 padraic/humbug_get_contents         1.0.4    BSD-3-Clause  
 padraic/phar-updater                1.0.4    BSD-3-Clause  
-platformsh/client                   v0.13.4  MIT           
-platformsh/console-form             v0.0.13  MIT           
+platformsh/client                   v0.13.7  MIT           
+platformsh/console-form             v0.0.15  MIT           
 psr/container                       1.0.0    MIT           
 psr/log                             1.0.2    MIT           
 react/promise                       v2.5.1   MIT           

++++++ platformsh-cli-3.24.1.tar.xz -> platformsh-cli-3.25.0.tar.xz ++++++
++++ 3215 lines of diff (skipped)

++++++ platformsh-cli-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     2017-12-07 15:29:47.285048385 +0100
+++ new/vendor/autoload.php     2017-12-13 22:17:57.833706250 +0100
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer/autoload_real.php';
 
-return ComposerAutoloaderInitf7da0fc16601fb075e6d206f96aa7881::getLoader();
+return ComposerAutoloaderInitdcee3781cfe3a2335811866ab3151ce5::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       2017-12-07 15:29:47.285048385 
+0100
+++ new/vendor/composer/autoload_real.php       2017-12-13 22:17:57.833706250 
+0100
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInitf7da0fc16601fb075e6d206f96aa7881
+class ComposerAutoloaderInitdcee3781cfe3a2335811866ab3151ce5
 {
     private static $loader;
 
@@ -19,15 +19,15 @@
             return self::$loader;
         }
 
-        
spl_autoload_register(array('ComposerAutoloaderInitf7da0fc16601fb075e6d206f96aa7881',
 'loadClassLoader'), true, true);
+        
spl_autoload_register(array('ComposerAutoloaderInitdcee3781cfe3a2335811866ab3151ce5',
 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        
spl_autoload_unregister(array('ComposerAutoloaderInitf7da0fc16601fb075e6d206f96aa7881',
 'loadClassLoader'));
+        
spl_autoload_unregister(array('ComposerAutoloaderInitdcee3781cfe3a2335811866ab3151ce5',
 '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\ComposerStaticInitf7da0fc16601fb075e6d206f96aa7881::getInitializer($loader));
+            
call_user_func(\Composer\Autoload\ComposerStaticInitdcee3781cfe3a2335811866ab3151ce5::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\ComposerStaticInitf7da0fc16601fb075e6d206f96aa7881::$files;
+            $includeFiles = 
Composer\Autoload\ComposerStaticInitdcee3781cfe3a2335811866ab3151ce5::$files;
         } else {
             $includeFiles = require __DIR__ . '/autoload_files.php';
         }
         foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequiref7da0fc16601fb075e6d206f96aa7881($fileIdentifier, 
$file);
+            composerRequiredcee3781cfe3a2335811866ab3151ce5($fileIdentifier, 
$file);
         }
 
         return $loader;
     }
 }
 
-function composerRequiref7da0fc16601fb075e6d206f96aa7881($fileIdentifier, 
$file)
+function composerRequiredcee3781cfe3a2335811866ab3151ce5($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     2017-12-07 15:29:47.285048385 
+0100
+++ new/vendor/composer/autoload_static.php     2017-12-13 22:17:57.833706250 
+0100
@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInitf7da0fc16601fb075e6d206f96aa7881
+class ComposerStaticInitdcee3781cfe3a2335811866ab3151ce5
 {
     public static $files = array (
         '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . 
'/symfony/polyfill-mbstring/bootstrap.php',
@@ -188,9 +188,9 @@
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = 
ComposerStaticInitf7da0fc16601fb075e6d206f96aa7881::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = 
ComposerStaticInitf7da0fc16601fb075e6d206f96aa7881::$prefixDirsPsr4;
-            $loader->classMap = 
ComposerStaticInitf7da0fc16601fb075e6d206f96aa7881::$classMap;
+            $loader->prefixLengthsPsr4 = 
ComposerStaticInitdcee3781cfe3a2335811866ab3151ce5::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = 
ComposerStaticInitdcee3781cfe3a2335811866ab3151ce5::$prefixDirsPsr4;
+            $loader->classMap = 
ComposerStaticInitdcee3781cfe3a2335811866ab3151ce5::$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  2017-12-07 15:29:46.649043715 +0100
+++ new/vendor/composer/installed.json  2017-12-13 22:17:57.217700813 +0100
@@ -1,17 +1,17 @@
 [
     {
         "name": "cweagans/composer-patches",
-        "version": "1.6.3",
-        "version_normalized": "1.6.3.0",
+        "version": "1.6.4",
+        "version_normalized": "1.6.4.0",
         "source": {
             "type": "git",
             "url": "https://github.com/cweagans/composer-patches.git";,
-            "reference": "730f0f620845974764a91482ac936cc6f39da184"
+            "reference": "462e65061606dc6149349535d4322241515d1b16"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/cweagans/composer-patches/zipball/730f0f620845974764a91482ac936cc6f39da184";,
-            "reference": "730f0f620845974764a91482ac936cc6f39da184",
+            "url": 
"https://api.github.com/repos/cweagans/composer-patches/zipball/462e65061606dc6149349535d4322241515d1b16";,
+            "reference": "462e65061606dc6149349535d4322241515d1b16",
             "shasum": ""
         },
         "require": {
@@ -22,7 +22,7 @@
             "composer/composer": "~1.0",
             "phpunit/phpunit": "~4.6"
         },
-        "time": "2017-11-22T20:18:27+00:00",
+        "time": "2017-12-07T16:16:31+00:00",
         "type": "composer-plugin",
         "extra": {
             "class": "cweagans\\Composer\\Patches"
@@ -657,17 +657,17 @@
     },
     {
         "name": "platformsh/client",
-        "version": "v0.13.4",
-        "version_normalized": "0.13.4.0",
+        "version": "v0.13.7",
+        "version_normalized": "0.13.7.0",
         "source": {
             "type": "git",
             "url": "https://github.com/platformsh/platformsh-client-php.git";,
-            "reference": "44a70e314bbb5f808627337e303a015a0ee2527d"
+            "reference": "62f990120e9c8dd386aca1abcd0fe2e92e1a1b43"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/platformsh/platformsh-client-php/zipball/44a70e314bbb5f808627337e303a015a0ee2527d";,
-            "reference": "44a70e314bbb5f808627337e303a015a0ee2527d",
+            "url": 
"https://api.github.com/repos/platformsh/platformsh-client-php/zipball/62f990120e9c8dd386aca1abcd0fe2e92e1a1b43";,
+            "reference": "62f990120e9c8dd386aca1abcd0fe2e92e1a1b43",
             "shasum": ""
         },
         "require": {
@@ -680,7 +680,7 @@
         "require-dev": {
             "phpunit/phpunit": "~4.5"
         },
-        "time": "2017-12-01T10:14:12+00:00",
+        "time": "2017-12-12T16:46:08+00:00",
         "type": "library",
         "extra": {
             "patches": {
@@ -947,17 +947,17 @@
     },
     {
         "name": "platformsh/console-form",
-        "version": "v0.0.13",
-        "version_normalized": "0.0.13.0",
+        "version": "v0.0.15",
+        "version_normalized": "0.0.15.0",
         "source": {
             "type": "git",
             "url": "https://github.com/platformsh/console-form.git";,
-            "reference": "6dc8507d5ed9e1a79fff4265d4f72a932e628015"
+            "reference": "f8d6ec0d810e24e3a028bfffae905325289b8559"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/platformsh/console-form/zipball/6dc8507d5ed9e1a79fff4265d4f72a932e628015";,
-            "reference": "6dc8507d5ed9e1a79fff4265d4f72a932e628015",
+            "url": 
"https://api.github.com/repos/platformsh/console-form/zipball/f8d6ec0d810e24e3a028bfffae905325289b8559";,
+            "reference": "f8d6ec0d810e24e3a028bfffae905325289b8559",
             "shasum": ""
         },
         "require": {
@@ -967,7 +967,7 @@
         "require-dev": {
             "phpunit/phpunit": "^5.0"
         },
-        "time": "2017-09-22T10:30:55+00:00",
+        "time": "2017-12-11T15:23:12+00:00",
         "type": "library",
         "installation-source": "dist",
         "autoload": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/cweagans/composer-patches/src/Patches.php 
new/vendor/cweagans/composer-patches/src/Patches.php
--- old/vendor/cweagans/composer-patches/src/Patches.php        2017-11-22 
21:18:27.000000000 +0100
+++ new/vendor/cweagans/composer-patches/src/Patches.php        2017-12-07 
17:16:31.000000000 +0100
@@ -361,32 +361,13 @@
       $downloader->copy($hostname, $patch_url, $filename, FALSE);
     }
 
-    // Modified from drush6:make.project.inc
-    $patched = FALSE;
     // The order here is intentional. p1 is most likely to apply with git 
apply.
     // p0 is next likely. p2 is extremely unlikely, but for some special cases,
     // it might be useful. p4 is useful for Magento 2 patches
     $patch_levels = array('-p1', '-p0', '-p2', '-p4');
-    foreach ($patch_levels as $patch_level) {
-      if ($this->io->isVerbose()) {
-        $comment = 'Testing ability to patch with git apply.';
-        $comment .= ' This command may produce errors that can be safely 
ignored.';
-        $this->io->write('<comment>' . $comment . '</comment>');
-      }
-      $checked = $this->executeCommand('git -C %s apply --check -v %s %s', 
$install_path, $patch_level, $filename);
-      $output = $this->executor->getErrorOutput();
-      if (substr($output, 0, 7) == 'Skipped') {
-        // Git will indicate success but silently skip patches in some 
scenarios.
-        //
-        // @see https://github.com/cweagans/composer-patches/pull/165
-        $checked = false;
-      }
-      if ($checked) {
-        // Apply the first successful style.
-        $patched = $this->executeCommand('git -C %s apply %s %s', 
$install_path, $patch_level, $filename);
-        break;
-      }
-    }
+
+    // Attempt to apply with git apply.
+    $patched = $this->applyPatchWithGit($install_path, $patch_levels, 
$filename);
 
     // In some rare cases, git will fail to apply a patch, fallback to using
     // the 'patch' command.
@@ -510,4 +491,45 @@
     return $merged;
   }
 
+  /**
+   * Attempts to apply a patch with git apply.
+   *
+   * @param $install_path
+   * @param $patch_levels
+   * @param $filename
+   *
+   * @return bool
+   *   TRUE if patch was applied, FALSE otherwise.
+   */
+  protected function applyPatchWithGit($install_path, $patch_levels, 
$filename) {
+    // Do not use git apply unless the install path is itself a git repo
+    // @see https://stackoverflow.com/a/27283285
+    if (!is_dir($install_path . '/.git')) {
+      return FALSE;
+    }
+
+    $patched = FALSE;
+    foreach ($patch_levels as $patch_level) {
+      if ($this->io->isVerbose()) {
+        $comment = 'Testing ability to patch with git apply.';
+        $comment .= ' This command may produce errors that can be safely 
ignored.';
+        $this->io->write('<comment>' . $comment . '</comment>');
+      }
+      $checked = $this->executeCommand('git -C %s apply --check -v %s %s', 
$install_path, $patch_level, $filename);
+      $output = $this->executor->getErrorOutput();
+      if (substr($output, 0, 7) == 'Skipped') {
+        // Git will indicate success but silently skip patches in some 
scenarios.
+        //
+        // @see https://github.com/cweagans/composer-patches/pull/165
+        $checked = FALSE;
+      }
+      if ($checked) {
+        // Apply the first successful style.
+        $patched = $this->executeCommand('git -C %s apply %s %s', 
$install_path, $patch_level, $filename);
+        break;
+      }
+    }
+    return $patched;
+  }
+
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/platformsh/client/src/Model/Environment.php 
new/vendor/platformsh/client/src/Model/Environment.php
--- old/vendor/platformsh/client/src/Model/Environment.php      2017-12-01 
11:14:12.000000000 +0100
+++ new/vendor/platformsh/client/src/Model/Environment.php      2017-12-12 
17:46:08.000000000 +0100
@@ -374,16 +374,17 @@
      * @param string $name
      * @param mixed  $value
      * @param bool   $json
+     * @param bool   $enabled
      *
      * @return Result
      */
-    public function setVariable($name, $value, $json = false)
+    public function setVariable($name, $value, $json = false, $enabled = true)
     {
         if (!is_scalar($value)) {
             $value = json_encode($value);
             $json = true;
         }
-        $values = ['value' => $value, 'is_json' => $json];
+        $values = ['value' => $value, 'is_json' => $json, 'is_enabled' => 
$enabled];
         $existing = $this->getVariable($name);
         if ($existing) {
             return $existing->update($values);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/platformsh/client/src/Session/Session.php 
new/vendor/platformsh/client/src/Session/Session.php
--- old/vendor/platformsh/client/src/Session/Session.php        2017-12-01 
11:14:12.000000000 +0100
+++ new/vendor/platformsh/client/src/Session/Session.php        2017-12-12 
17:46:08.000000000 +0100
@@ -33,6 +33,7 @@
     {
         if (!$this->loaded || $reload) {
             if (isset($this->storage)) {
+                $this->data = [];
                 $this->storage->load($this);
                 $this->original = $this->data;
                 $this->loaded = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/platformsh/console-form/src/Field/ArrayField.php 
new/vendor/platformsh/console-form/src/Field/ArrayField.php
--- old/vendor/platformsh/console-form/src/Field/ArrayField.php 2017-09-22 
12:30:55.000000000 +0200
+++ new/vendor/platformsh/console-form/src/Field/ArrayField.php 2017-12-11 
16:23:12.000000000 +0100
@@ -26,13 +26,15 @@
      */
     protected function getQuestionText()
     {
-        $text = $this->name;
+        $text = $this->getQuestionHeader(false);
         if (!empty($this->default)) {
-            $text .= ' <question>[default: ' . 
$this->formatDefault($this->default) . ']</question>';
-        } else {
-            $text .= ' <question>[comma-separated]</question>';
+            $text .= "\n" . 'Default: <question>' . implode(', ', (array) 
$this->default) . '</question>';
         }
-        $text .= ': ';
+        $text .= "\nEnter comma-separated values";
+        if (!$this->isRequired()) {
+            $text .= ' (or leave this blank)';
+        }
+        $text .= "\n" . $this->prompt;
 
         return $text;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/platformsh/console-form/src/Field/BooleanField.php 
new/vendor/platformsh/console-form/src/Field/BooleanField.php
--- old/vendor/platformsh/console-form/src/Field/BooleanField.php       
2017-09-22 12:30:55.000000000 +0200
+++ new/vendor/platformsh/console-form/src/Field/BooleanField.php       
2017-12-11 16:23:12.000000000 +0100
@@ -13,7 +13,7 @@
      */
     protected function getQuestionText()
     {
-        return $this->name
+        return rtrim($this->getQuestionHeader(false), '?')
           . '? <question>['
           . ($this->default ? 'Y|n' : 'y|N')
           . ']</question> ';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/platformsh/console-form/src/Field/Field.php 
new/vendor/platformsh/console-form/src/Field/Field.php
--- old/vendor/platformsh/console-form/src/Field/Field.php      2017-09-22 
12:30:55.000000000 +0200
+++ new/vendor/platformsh/console-form/src/Field/Field.php      2017-12-11 
16:23:12.000000000 +0100
@@ -42,7 +42,24 @@
      *
      * @var string
      */
-    protected $description;
+    protected $description = '';
+
+    /**
+     * The questioning or explanatory line of text in an interactive question.
+     *
+     * If this is null (the default), the description of the field will be 
used.
+     * If this is set to an empty string, no line will be shown.
+     *
+     * @var string|null
+     */
+    protected $questionLine = null;
+
+    /**
+     * Values used for auto-completion.
+     *
+     * @var null|array
+     */
+    protected $autoCompleterValues;
 
     /**
      * Whether the field is required.
@@ -61,6 +78,20 @@
     protected $default;
 
     /**
+     * The prompt.
+     *
+     * @var string
+     */
+    protected $prompt = '> ';
+
+    /**
+     * The required value marker.
+     *
+     * @var string
+     */
+    protected $requiredMarker = '<fg=red>*</> ';
+
+    /**
      * A callback used to calculate a dynamic default.
      *
      * The callback accepts an array of values entered previously for other 
form
@@ -247,15 +278,51 @@
     public function getAsOption()
     {
         return new InputOption(
-          $this->getOptionName(),
-          $this->shortcut,
-          $this->getOptionMode(),
-          $this->description ? $this->description : $this->name,
-          $this->default
+            $this->getOptionName(),
+            $this->shortcut,
+            $this->getOptionMode(),
+            $this->getDescription(),
+            $this->default
         );
     }
 
     /**
+     * Get the description of the field, used in help and interactive 
questions.
+     *
+     * @return string
+     */
+    protected function getDescription()
+    {
+        return $this->description ?: $this->name;
+    }
+
+    /**
+     * Get the header text for an interactive question.
+     *
+     * @param bool $includeDefault
+     *
+     * @return string
+     */
+    protected function getQuestionHeader($includeDefault = true)
+    {
+        $header = '';
+        if ($this->isRequired()) {
+            $header .= $this->requiredMarker;
+        }
+        $header .= '<fg=green>' . $this->name . '</> (--' . 
$this->getOptionName() . ')';
+        if ($this->questionLine === null && !empty($this->description)) {
+            $header .= "\n" . $this->description;
+        } elseif (!empty($this->questionLine)) {
+            $header .= "\n" . $this->questionLine;
+        }
+        if ($includeDefault && $this->default !== null) {
+            $header .= "\n" . 'Default: <question>' . 
$this->formatDefault($this->default) . '</question>';
+        }
+
+        return $header;
+    }
+
+    /**
      * Get the field as a Console question.
      *
      * @return Question
@@ -272,6 +339,7 @@
 
             return $value;
         });
+        $question->setAutocompleterValues($this->autoCompleterValues);
 
         return $question;
     }
@@ -283,13 +351,7 @@
      */
     protected function getQuestionText()
     {
-        $text = $this->name;
-        if ($this->default !== null) {
-            $text .= ' <question>[default: ' . 
$this->formatDefault($this->default) . ']</question>';
-        }
-        $text .= ': ';
-
-        return $text;
+        return $this->getQuestionHeader() . "\n" . $this->prompt;
     }
 
     /**
@@ -303,8 +365,8 @@
      */
     protected function formatDefault($default)
     {
-        if (PHP_VERSION_ID < 50400) {
-            return str_replace('\/', '/', json_encode($default));
+        if (is_string($default)) {
+            return $default;
         }
 
         return json_encode($default, JSON_UNESCAPED_SLASHES | 
JSON_UNESCAPED_UNICODE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/platformsh/console-form/src/Field/OptionsField.php 
new/vendor/platformsh/console-form/src/Field/OptionsField.php
--- old/vendor/platformsh/console-form/src/Field/OptionsField.php       
2017-09-22 12:30:55.000000000 +0200
+++ new/vendor/platformsh/console-form/src/Field/OptionsField.php       
2017-12-11 16:23:12.000000000 +0100
@@ -68,16 +68,31 @@
             ? array_search($this->default, $this->options, true) : 
$this->default;
 
         $question = new ChoiceQuestion(
-            $this->name . " (enter a number to choose): ",
+            $this->getQuestionHeader() . "\nEnter a number to choose: ",
             $this->options,
             $defaultKey !== false ? $defaultKey : null
         );
+        $question->setPrompt($this->prompt);
         $question->setMaxAttempts($this->maxAttempts);
 
         return $question;
     }
 
     /**
+     * @return string
+     */
+    protected function getDescription()
+    {
+        $description = parent::getDescription();
+        $optionsString = "'" . implode("', '", $this->options) . "'";
+        if (strlen($optionsString) < 255) {
+            $description .= ' (' . $optionsString . ')';
+        }
+
+        return $description;
+    }
+
+    /**
      * {@inheritdoc}
      */
     public function onChange(array $previousValues)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/platformsh/console-form/src/Form.php 
new/vendor/platformsh/console-form/src/Form.php
--- old/vendor/platformsh/console-form/src/Form.php     2017-09-22 
12:30:55.000000000 +0200
+++ new/vendor/platformsh/console-form/src/Form.php     2017-12-11 
16:23:12.000000000 +0100
@@ -8,6 +8,7 @@
 use Symfony\Component\Console\Helper\QuestionHelper;
 use Symfony\Component\Console\Input\InputDefinition;
 use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\ConsoleOutput;
 use Symfony\Component\Console\Output\OutputInterface;
 
 class Form
@@ -106,6 +107,7 @@
     public function resolveOptions(InputInterface $input, OutputInterface 
$output, QuestionHelper $helper)
     {
         $values = [];
+        $stdErr = $output instanceof ConsoleOutput ? $output->getErrorOutput() 
: $output;
         foreach ($this->fields as $key => $field) {
             $field->onChange($values);
 
@@ -119,7 +121,8 @@
                 $field->validate($value);
             } elseif ($input->isInteractive()) {
                 // Get the value interactively.
-                $value = $helper->ask($input, $output, 
$field->getAsQuestion());
+                $value = $helper->ask($input, $stdErr, 
$field->getAsQuestion());
+                $stdErr->writeln('');
             } elseif ($field->isRequired()) {
                 throw new MissingValueException('--' . $field->getOptionName() 
. ' is required');
             }


Reply via email to