Hello community,

here is the log from the commit of package platformsh-cli for openSUSE:Factory 
checked in at 2018-06-20 15:30:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/platformsh-cli (Old)
 and      /work/SRC/openSUSE:Factory/.platformsh-cli.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "platformsh-cli"

Wed Jun 20 15:30:44 2018 rev:49 rq:617588 version:3.33.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/platformsh-cli/platformsh-cli.changes    
2018-05-17 18:05:31.795635932 +0200
+++ /work/SRC/openSUSE:Factory/.platformsh-cli.new/platformsh-cli.changes       
2018-06-20 15:32:05.336482754 +0200
@@ -1,0 +2,37 @@
+Mon Jun 18 23:33:19 UTC 2018 - ji...@boombatower.com
+
+- Update to version 3.33.4:
+  * Release v3.33.4
+  * Identifier: extract cluster name even from failed responses
+  * Fix the web root symlink for a top-level app in a multi-app project
+  * Remove hidden commands from autocomplete
+  * Browser login: print shell command when in very-verbose mode
+
+-------------------------------------------------------------------
+Wed Jun 06 23:12:03 UTC 2018 - ji...@boombatower.com
+
+- Update to version 3.33.3:
+  * Release v3.33.3
+  * Complete installation without an existing shell config file (#725)
+  * Fix uninitialized string offset warning in YamlParser
+  * Change default db:dump filename to use the environment's machine name
+
+-------------------------------------------------------------------
+Tue May 22 22:16:11 UTC 2018 - ji...@boombatower.com
+
+- Update to version 3.33.2:
+  * Release v3.33.2
+  * Fix command not found problem in crons
+  * Allow color in composer install
+  * Revert "Installer: use manifest direct from GitHub"
+  * Installer: use manifest direct from GitHub
+  * Slack channel can be an ID (#719)
+
+-------------------------------------------------------------------
+Thu May 17 12:46:38 UTC 2018 - ji...@boombatower.com
+
+- Update to version 3.33.1:
+  * Release v3.33.1
+  * Work around regression caused by previous commit 6659d65
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ platformsh-cli.spec ++++++
--- /var/tmp/diff_new_pack.la5xfs/_old  2018-06-20 15:32:07.608400323 +0200
+++ /var/tmp/diff_new_pack.la5xfs/_new  2018-06-20 15:32:07.612400178 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           platformsh-cli
-Version:        3.33.0
+Version:        3.33.4
 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.la5xfs/_old  2018-06-20 15:32:07.648398872 +0200
+++ /var/tmp/diff_new_pack.la5xfs/_new  2018-06-20 15:32:07.648398872 +0200
@@ -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.33.0</param>
+    <param name="revision">refs/tags/v3.33.4</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.la5xfs/_old  2018-06-20 15:32:07.672398001 +0200
+++ /var/tmp/diff_new_pack.la5xfs/_new  2018-06-20 15:32:07.672398001 +0200
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">git://github.com/platformsh/platformsh-cli.git</param>
-    <param 
name="changesrevision">d74fec48620834ff1ce4ce028c90219b39a38eef</param>
+    <param 
name="changesrevision">f22ec7cd383b190b241d7cdf8b21d13d4addfcf5</param>
   </service>
 </servicedata>

++++++ licenses.txt ++++++
--- /var/tmp/diff_new_pack.la5xfs/_old  2018-06-20 15:32:07.720396259 +0200
+++ /var/tmp/diff_new_pack.la5xfs/_new  2018-06-20 15:32:07.720396259 +0200
@@ -22,7 +22,7 @@
 psr/container                       1.0.0    MIT           
 psr/log                             1.0.2    MIT           
 react/promise                       v2.5.1   MIT           
-stecman/symfony-console-completion  0.7.0    MIT           
+stecman/symfony-console-completion  0.8.0    MIT           
 symfony/config                      v3.4.6   MIT           
 symfony/console                     v3.4.6   MIT           
 symfony/debug                       v3.4.6   MIT           

++++++ platformsh-cli-3.33.0.tar.xz -> platformsh-cli-3.33.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/platformsh-cli-3.33.0/composer.json 
new/platformsh-cli-3.33.4/composer.json
--- old/platformsh-cli-3.33.0/composer.json     2018-05-16 18:47:49.000000000 
+0200
+++ new/platformsh-cli-3.33.4/composer.json     2018-06-18 11:34:30.000000000 
+0200
@@ -9,12 +9,12 @@
         "guzzlehttp/ringphp": "^1.1",
         "platformsh/console-form": ">=0.0.20 <2.0",
         "platformsh/client": ">=0.19.0 <2.0",
-        "symfony/console": "^3.0 !=3.2.5 !=3.2.6",
+        "symfony/console": "^3.0 >=3.2",
         "symfony/yaml": "^3.0 || ^2.6",
         "symfony/finder": "^3.0",
         "symfony/filesystem": "^3.0",
         "symfony/process": "^3.0 >=3.4",
-        "stecman/symfony-console-completion": "~0.7",
+        "stecman/symfony-console-completion": "^0.8 >=0.8",
         "symfony/event-dispatcher": "^3.0",
         "padraic/phar-updater": "^1.0",
         "symfony/dependency-injection": "^3.1",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/platformsh-cli-3.33.0/composer.lock 
new/platformsh-cli-3.33.4/composer.lock
--- old/platformsh-cli-3.33.0/composer.lock     2018-05-16 18:47:49.000000000 
+0200
+++ new/platformsh-cli-3.33.4/composer.lock     2018-06-18 11:34:30.000000000 
+0200
@@ -4,7 +4,7 @@
         "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
         "This file is @generated automatically"
     ],
-    "content-hash": "74c0af5321e8db7fd50eadd0f54f1e74",
+    "content-hash": "38dce8ffb407b4a7fc74e245f72c3c2a",
     "packages": [
         {
             "name": "cocur/slugify",
@@ -647,7 +647,7 @@
             ],
             "authors": [
                 {
-                    "name": "Padraic Brady",
+                    "name": "Pádraic Brady",
                     "email": "padraic.br...@gmail.com",
                     "homepage": "http://blog.astrumfutura.com";
                 }
@@ -941,24 +941,24 @@
         },
         {
             "name": "stecman/symfony-console-completion",
-            "version": "0.7.0",
+            "version": "0.8.0",
             "source": {
                 "type": "git",
                 "url": 
"https://github.com/stecman/symfony-console-completion.git";,
-                "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb"
+                "reference": "cd738867503477e91dbe84173dfabd431c883431"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/stecman/symfony-console-completion/zipball/5461d43e53092b3d3b9dbd9d999f2054730f4bbb";,
-                "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb",
+                "url": 
"https://api.github.com/repos/stecman/symfony-console-completion/zipball/cd738867503477e91dbe84173dfabd431c883431";,
+                "reference": "cd738867503477e91dbe84173dfabd431c883431",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.2",
-                "symfony/console": "~2.3 || ~3.0"
+                "symfony/console": "~2.3 || ~3.0 || ~4.0"
             },
             "require-dev": {
-                "phpunit/phpunit": "~4.4"
+                "phpunit/phpunit": "~4.8.36 || ~5.7 || ~6.4"
             },
             "type": "library",
             "extra": {
@@ -982,7 +982,7 @@
                 }
             ],
             "description": "Automatic BASH completion for Symfony Console 
Component based applications.",
-            "time": "2016-02-24T05:08:54+00:00"
+            "time": "2018-02-10T04:28:01+00:00"
         },
         {
             "name": "symfony/config",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/platformsh-cli-3.33.0/config.yaml 
new/platformsh-cli-3.33.4/config.yaml
--- old/platformsh-cli-3.33.0/config.yaml       2018-05-16 18:47:49.000000000 
+0200
+++ new/platformsh-cli-3.33.4/config.yaml       2018-06-18 11:34:30.000000000 
+0200
@@ -1,7 +1,7 @@
 # Metadata about the CLI application itself.
 application:
   name: 'Platform.sh CLI'
-  version: '3.33.0'
+  version: '3.33.4'
   executable: 'platform'
   package_name: 'platformsh/cli'
   installer_url: 'https://platform.sh/cli/installer'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/platformsh-cli-3.33.0/dist/manifest.json 
new/platformsh-cli-3.33.4/dist/manifest.json
--- old/platformsh-cli-3.33.0/dist/manifest.json        2018-05-16 
18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/dist/manifest.json        2018-06-18 
11:34:30.000000000 +0200
@@ -1,10 +1,10 @@
 [
     {
         "name": "platform.phar",
-        "sha1": "5475eaa9a92eba96ff89982c4c3d7e0d67c486a0",
-        "sha256": 
"1b1cd2ce4bb721c000f6549f37d9bc981be0d616b8e91d0390d74993251c0f3f",
-        "url": 
"https://github.com/platformsh/platformsh-cli/releases/download/v3.33.0/platform.phar";,
-        "version": "3.33.0",
+        "sha1": "e6138e20f1aa1276afc1a7f305e2a6d1b65b7525",
+        "sha256": 
"5072c6799a5477a8335c549cc4d62030e7c70b3ef8dc2be195adddd61ae9070f",
+        "url": 
"https://github.com/platformsh/platformsh-cli/releases/download/v3.33.4/platform.phar";,
+        "version": "3.33.4",
         "php": {
             "min": "5.5.9"
         },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/platformsh-cli-3.33.0/src/Command/Auth/BrowserLoginCommand.php 
new/platformsh-cli-3.33.4/src/Command/Auth/BrowserLoginCommand.php
--- old/platformsh-cli-3.33.0/src/Command/Auth/BrowserLoginCommand.php  
2018-05-16 18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Command/Auth/BrowserLoginCommand.php  
2018-06-18 11:34:30.000000000 +0200
@@ -142,6 +142,7 @@
             'CLI_OAUTH_FILE' => $codeFile,
         ]);
         $process->setTimeout(null);
+        $this->stdErr->writeln('Starting local web server with command: 
<info>' . $process->getCommandLine() . '</info>', 
OutputInterface::VERBOSITY_VERY_VERBOSE);
         $process->start();
 
         // Give the local server some time to start before checking its status
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/platformsh-cli-3.33.0/src/Command/CanHideInListInterface.php 
new/platformsh-cli-3.33.4/src/Command/CanHideInListInterface.php
--- old/platformsh-cli-3.33.0/src/Command/CanHideInListInterface.php    
2018-05-16 18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Command/CanHideInListInterface.php    
1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-<?php
-namespace Platformsh\Cli\Command;
-
-interface CanHideInListInterface
-{
-    /**
-     * Whether the command should be hidden in lists of commands.
-     *
-     * @return bool
-     */
-    public function isHiddenInList();
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/platformsh-cli-3.33.0/src/Command/CommandBase.php 
new/platformsh-cli-3.33.4/src/Command/CommandBase.php
--- old/platformsh-cli-3.33.0/src/Command/CommandBase.php       2018-05-16 
18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Command/CommandBase.php       2018-06-18 
11:34:30.000000000 +0200
@@ -23,7 +23,7 @@
 use Symfony\Component\DependencyInjection\ContainerBuilder;
 use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
 
-abstract class CommandBase extends Command implements CanHideInListInterface, 
MultiAwareInterface
+abstract class CommandBase extends Command implements MultiAwareInterface
 {
     use HasExamplesTrait;
 
@@ -96,7 +96,7 @@
     /**
      * {@inheritdoc}
      */
-    public function isHiddenInList()
+    public function isHidden()
     {
         return $this->hiddenInList;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/platformsh-cli-3.33.0/src/Command/CompletionCommand.php 
new/platformsh-cli-3.33.4/src/Command/CompletionCommand.php
--- old/platformsh-cli-3.33.0/src/Command/CompletionCommand.php 2018-05-16 
18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Command/CompletionCommand.php 2018-06-18 
11:34:30.000000000 +0200
@@ -7,7 +7,7 @@
 use Stecman\Component\Symfony\Console\BashCompletion\Completion;
 use Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand as 
ParentCompletionCommand;
 
-class CompletionCommand extends ParentCompletionCommand implements 
CanHideInListInterface
+class CompletionCommand extends ParentCompletionCommand
 {
 
     /** @var Api */
@@ -25,7 +25,7 @@
     /**
      * {@inheritdoc}
      */
-    public function isHiddenInList()
+    public function isHidden()
     {
         return true;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/platformsh-cli-3.33.0/src/Command/Db/DbDumpCommand.php 
new/platformsh-cli-3.33.4/src/Command/Db/DbDumpCommand.php
--- old/platformsh-cli-3.33.0/src/Command/Db/DbDumpCommand.php  2018-05-16 
18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Command/Db/DbDumpCommand.php  2018-06-18 
11:34:30.000000000 +0200
@@ -239,7 +239,7 @@
         $schemaOnly = false,
         $gzip = false)
     {
-        $defaultFilename = $environment->project . '--' . $environment->id;
+        $defaultFilename = $environment->project . '--' . 
$environment->machine_name;
         if ($appName !== null) {
             $defaultFilename .= '--' . $appName;
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/platformsh-cli-3.33.0/src/Command/Environment/EnvironmentDrushCommand.php 
new/platformsh-cli-3.33.4/src/Command/Environment/EnvironmentDrushCommand.php
--- 
old/platformsh-cli-3.33.0/src/Command/Environment/EnvironmentDrushCommand.php   
    2018-05-16 18:47:49.000000000 +0200
+++ 
new/platformsh-cli-3.33.4/src/Command/Environment/EnvironmentDrushCommand.php   
    2018-06-18 11:34:30.000000000 +0200
@@ -29,7 +29,7 @@
         $this->addExample('Enable the Overlay module on the remote 
environment', "'en overlay'");
     }
 
-    public function isHiddenInList()
+    public function isHidden()
     {
         // Hide this command in the list if the project is not Drupal.
         $projectRoot = $this->getProjectRoot();
@@ -37,7 +37,7 @@
             return true;
         }
 
-        return parent::isHiddenInList();
+        return parent::isHidden();
     }
 
     protected function execute(InputInterface $input, OutputInterface $output)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/platformsh-cli-3.33.0/src/Command/Integration/IntegrationCommandBase.php 
new/platformsh-cli-3.33.4/src/Command/Integration/IntegrationCommandBase.php
--- 
old/platformsh-cli-3.33.0/src/Command/Integration/IntegrationCommandBase.php    
    2018-05-16 18:47:49.000000000 +0200
+++ 
new/platformsh-cli-3.33.4/src/Command/Integration/IntegrationCommandBase.php    
    2018-06-18 11:34:30.000000000 +0200
@@ -223,10 +223,7 @@
                 'conditions' => ['type' => [
                     'health.slack',
                 ]],
-                'description' => 'The Slack channel (beginning with the #)',
-                'validator' => function ($string) {
-                    return strpos($string, '#') === 0;
-                },
+                'description' => 'The Slack channel',
             ]),
             'routing_key' => new Field('Routing key', [
                 'conditions' => ['type' => [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/platformsh-cli-3.33.0/src/Command/LegacyMigrateCommand.php 
new/platformsh-cli-3.33.4/src/Command/LegacyMigrateCommand.php
--- old/platformsh-cli-3.33.0/src/Command/LegacyMigrateCommand.php      
2018-05-16 18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Command/LegacyMigrateCommand.php      
2018-06-18 11:34:30.000000000 +0200
@@ -29,7 +29,7 @@
         );
     }
 
-    public function isHiddenInList()
+    public function isHidden()
     {
         /** @var \Platformsh\Cli\Local\LocalProject $localProject */
         $localProject = $this->getService('local.project');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/platformsh-cli-3.33.0/src/Command/Local/LocalDrushAliasesCommand.php 
new/platformsh-cli-3.33.4/src/Command/Local/LocalDrushAliasesCommand.php
--- old/platformsh-cli-3.33.0/src/Command/Local/LocalDrushAliasesCommand.php    
2018-05-16 18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Command/Local/LocalDrushAliasesCommand.php    
2018-06-18 11:34:30.000000000 +0200
@@ -27,7 +27,7 @@
         $this->addExample('Change the alias group to @example', '-g example');
     }
 
-    public function isHiddenInList()
+    public function isHidden()
     {
         // Hide this command in the list if the project is not Drupal.
         $projectRoot = $this->getProjectRoot();
@@ -35,7 +35,7 @@
             return true;
         }
 
-        return parent::isHiddenInList();
+        return parent::isHidden();
     }
 
     protected function execute(InputInterface $input, OutputInterface $output)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/platformsh-cli-3.33.0/src/Command/Self/SelfInstallCommand.php 
new/platformsh-cli-3.33.4/src/Command/Self/SelfInstallCommand.php
--- old/platformsh-cli-3.33.0/src/Command/Self/SelfInstallCommand.php   
2018-05-16 18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Command/Self/SelfInstallCommand.php   
2018-06-18 11:34:30.000000000 +0200
@@ -45,19 +45,21 @@
 
         $currentShellConfig = '';
 
-        if ($shellConfigFile !== false && file_exists($shellConfigFile)) {
-            $this->stdErr->writeln(sprintf('Reading shell configuration file: 
%s', $shellConfigFile));
-
-            $currentShellConfig = file_get_contents($shellConfigFile);
-            if ($currentShellConfig === false) {
-                $this->stdErr->writeln('Failed to read file');
-                return 1;
+        if ($shellConfigFile !== false) {
+            $this->stdErr->writeln(sprintf('Selected shell configuration file: 
<info>%s</info>', $shellConfigFile));
+            if (file_exists($shellConfigFile)) {
+                $currentShellConfig = file_get_contents($shellConfigFile);
+                if ($currentShellConfig === false) {
+                    $this->stdErr->writeln('Failed to read file.');
+                    return 1;
+                }
             }
         }
 
         $configDirRelative = $this->config()->getUserConfigDir(false);
         $rcDestination = $configDirRelative . '/' . 'shell-config.rc';
-        $suggestedShellConfig = sprintf(
+        $suggestedShellConfig = 'HOME=${HOME:-' . 
escapeshellarg(Filesystem::getHomeDirectory()) . '}';
+        $suggestedShellConfig .= PHP_EOL . sprintf(
             'export PATH=%s:"$PATH"',
             '"$HOME/"' . escapeshellarg($configDirRelative . '/bin')
         );
@@ -67,7 +69,7 @@
         );
 
         if (strpos($currentShellConfig, $suggestedShellConfig) !== false) {
-            $this->stdErr->writeln(sprintf('Already configured: 
<info>%s</info>', $shellConfigFile));
+            $this->stdErr->writeln('Already configured.');
             $this->stdErr->writeln('');
             $this->stdErr->writeln(sprintf(
                 "To use the %s, run:\n    <info>%s</info>",
@@ -79,11 +81,27 @@
 
         /** @var \Platformsh\Cli\Service\QuestionHelper $questionHelper */
         $questionHelper = $this->getService('question_helper');
-        if ($shellConfigFile === false || !$questionHelper->confirm('Do you 
want to update the file automatically?')) {
+        $modify = false;
+        if ($shellConfigFile !== false) {
+            $confirmText = file_exists($shellConfigFile)
+                ? 'Do you want to update the file automatically?'
+                : 'Do you want to create the file automatically?';
+            if ($questionHelper->confirm($confirmText)) {
+                $modify = true;
+            }
+        }
+
+        $appName = (string) $this->config()->get('application.name');
+        $begin = '# BEGIN SNIPPET: ' . $appName . ' configuration';
+        $end = '# END SNIPPET';
+
+        if ($shellConfigFile === false || !$modify) {
             $suggestedShellConfig = PHP_EOL
-                . '# ' . $this->config()->get('application.name') . ' 
configuration'
+                . $begin
                 . PHP_EOL
-                . $suggestedShellConfig;
+                . $suggestedShellConfig
+                . ' ' . $end;
+            $this->stdErr->writeln('');
 
             if ($shellConfigFile !== false) {
                 $this->stdErr->writeln(sprintf(
@@ -91,21 +109,34 @@
                     $shellConfigFile
                 ));
             } else {
-                $this->stdErr->writeln(sprintf(
-                    'To set up the CLI, add the following lines to your shell 
configuration file:',
-                    $shellConfigFile
-                ));
+                $this->stdErr->writeln(
+                    'To set up the CLI, add the following lines to your shell 
configuration file:'
+                );
             }
 
-            $this->stdErr->writeln(preg_replace('/^/m', '  ', 
$suggestedShellConfig));
+            $this->stdErr->writeln($suggestedShellConfig);
             return 1;
         }
 
-        $begin = '# BEGIN SNIPPET: Automatically added by the ' . 
$this->config()->get('application.name');
-        $end = '# END SNIPPET';
-
+        // Look for the position of the $begin string in the current config.
         $beginPos = strpos($currentShellConfig, $begin);
-        $endPos = strpos($currentShellConfig, $end, $beginPos ?: 0);
+
+        // Otherwise, look for a line that loosely matches the $begin string.
+        if ($beginPos === false) {
+            $beginPattern = '/^' . preg_quote('# BEGIN SNIPPET:') . '[^\n]*' . 
preg_quote($appName) . '[^\n]*$/m';
+            if (preg_match($beginPattern, $currentShellConfig, $matches, 
PREG_OFFSET_CAPTURE)) {
+                $beginPos = $matches[0][1];
+            }
+        }
+
+        // Find the snippet's end: the first occurrence of $end after $begin.
+        $endPos = false;
+        if ($beginPos !== false) {
+            $endPos = strpos($currentShellConfig, $end, $beginPos);
+        }
+
+        // If an existing snippet has been found, update it. Otherwise, add a
+        // new snippet to the end of the file.
         if ($beginPos !== false && $endPos !== false && $endPos > $beginPos) {
             $newShellConfig = substr_replace(
                 $currentShellConfig,
@@ -150,8 +181,7 @@
      * Finds a shell configuration file for the user.
      *
      * @return string|false
-     *   The absolute path to an existing shell config file, or false on
-     *   failure.
+     *   The absolute path to a shell config file, or false on failure.
      */
     protected function findShellConfigFile()
     {
@@ -178,6 +208,13 @@
             }
         }
 
+        // If none of the files exist (yet), then pick the first one.
+        if (is_writable($homeDir)) {
+            $filename = reset($candidates) ?: '.bash_profile';
+
+            return $homeDir . DIRECTORY_SEPARATOR . $filename;
+        }
+
         return false;
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/platformsh-cli-3.33.0/src/Console/CustomTextDescriptor.php 
new/platformsh-cli-3.33.4/src/Console/CustomTextDescriptor.php
--- old/platformsh-cli-3.33.0/src/Console/CustomTextDescriptor.php      
2018-05-16 18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Console/CustomTextDescriptor.php      
2018-06-18 11:34:30.000000000 +0200
@@ -7,7 +7,6 @@
 
 namespace Platformsh\Cli\Console;
 
-use Platformsh\Cli\Command\CanHideInListInterface;
 use Platformsh\Cli\Command\CommandBase;
 use Symfony\Component\Console\Application as ConsoleApplication;
 use Symfony\Component\Console\Command\Command;
@@ -119,7 +118,7 @@
                 $commands = [];
                 foreach ($namespace['commands'] as $name) {
                     $command = $description->getCommand($name);
-                    if (empty($options['all']) && $command instanceof 
CanHideInListInterface && $command->isHiddenInList()) {
+                    if (empty($options['all']) && $command->isHidden()) {
                         continue;
                     }
                     $commands[$name] = $command;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/platformsh-cli-3.33.0/src/Local/BuildFlavor/Composer.php 
new/platformsh-cli-3.33.4/src/Local/BuildFlavor/Composer.php
--- old/platformsh-cli-3.33.0/src/Local/BuildFlavor/Composer.php        
2018-05-16 18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Local/BuildFlavor/Composer.php        
2018-06-18 11:34:30.000000000 +0200
@@ -32,7 +32,6 @@
                 '--prefer-dist',
                 '--optimize-autoloader',
                 '--no-interaction',
-                '--no-ansi',
             ];
             if ($this->stdErr->getVerbosity() >= 
OutputInterface::VERBOSITY_DEBUG) {
                 $args[] = '-vvv';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/platformsh-cli-3.33.0/src/Local/LocalApplication.php 
new/platformsh-cli-3.33.4/src/Local/LocalApplication.php
--- old/platformsh-cli-3.33.0/src/Local/LocalApplication.php    2018-05-16 
18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Local/LocalApplication.php    2018-06-18 
11:34:30.000000000 +0200
@@ -18,6 +18,8 @@
     protected $cliConfig;
     protected $mount;
 
+    private $single = false;
+
     /**
      * @param string      $appRoot
      * @param Config|null $cliConfig
@@ -45,11 +47,23 @@
     }
 
     /**
-     * Test whether this application is the only one in the project.
+     * Returns whether this application is the only one in the project.
+     *
+     * @return bool
      */
     public function isSingle()
     {
-       return $this->sourceDir === $this->appRoot;
+       return $this->single;
+    }
+
+    /**
+     * Set that this is is the only application in the project.
+     *
+     * @param bool $single
+     */
+    public function setSingle($single = true)
+    {
+        $this->single = $single;
     }
 
     /**
@@ -227,6 +241,7 @@
                ])
                ->depth('< 5');
 
+        /** @var \Platformsh\Cli\Local\LocalApplication[] $applications */
         $applications = [];
 
         /** @var \Symfony\Component\Finder\SplFileInfo $file */
@@ -241,6 +256,13 @@
             $applications[$directory] = new LocalApplication($directory, 
$config, $directory);
         }
 
+        if (count($applications) === 1) {
+            foreach ($applications as $application) {
+                $application->setSingle(true);
+                break;
+            }
+        }
+
         return $applications;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/platformsh-cli-3.33.0/src/Local/LocalBuild.php 
new/platformsh-cli-3.33.4/src/Local/LocalBuild.php
--- old/platformsh-cli-3.33.0/src/Local/LocalBuild.php  2018-05-16 
18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Local/LocalBuild.php  2018-06-18 
11:34:30.000000000 +0200
@@ -357,11 +357,12 @@
             return false;
         }
 
-        $this->fsHelper->symlink($webRoot, 
$app->getLocalWebRoot($destination));
+        $localWebRoot = $app->getLocalWebRoot($destination);
+        $this->fsHelper->symlink($webRoot, $localWebRoot);
 
         $message = "\nBuild complete for application <info>$appId</info>";
         $this->output->writeln($message);
-        $this->output->writeln("Web root: <info>$destination</info>\n");
+        $this->output->writeln("Web root: <info>$localWebRoot</info>\n");
 
         return $success;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/platformsh-cli-3.33.0/src/Service/Api.php 
new/platformsh-cli-3.33.4/src/Service/Api.php
--- old/platformsh-cli-3.33.0/src/Service/Api.php       2018-05-16 
18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Service/Api.php       2018-06-18 
11:34:30.000000000 +0200
@@ -211,15 +211,19 @@
 
             self::$client = new PlatformClient($connector);
 
-            $connector->getClient()->getEmitter()->on('error', function 
(ErrorEvent $event) {
-                if ($event->getResponse() && 
$event->getResponse()->getStatusCode() === 403) {
-                    $this->on403($event);
-                }
-            });
-
             if ($autoLogin && !$connector->isLoggedIn()) {
                 $this->dispatcher->dispatch('login_required');
             }
+
+            try {
+                $connector->getClient()->getEmitter()->on('error', function 
(ErrorEvent $event) {
+                    if ($event->getResponse() && 
$event->getResponse()->getStatusCode() === 403) {
+                        $this->on403($event);
+                    }
+                });
+            } catch (\RuntimeException $e) {
+                // Ignore errors if the user is not logged in at this stage.
+            }
         }
 
         return self::$client;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/platformsh-cli-3.33.0/src/Service/Identifier.php 
new/platformsh-cli-3.33.4/src/Service/Identifier.php
--- old/platformsh-cli-3.33.0/src/Service/Identifier.php        2018-05-16 
18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Service/Identifier.php        2018-06-18 
11:34:30.000000000 +0200
@@ -162,12 +162,21 @@
                     'connect_timeout' => 5,
                     'allow_redirects' => false,
                 ]);
-                $cluster = 
$response->getHeaderAsArray($this->config->get('service.header_prefix') . 
'-cluster');
-                $this->cache->save($cacheKey, $cluster, 86400);
             } catch (RequestException $e) {
-                $this->debug($e->getMessage());
+                // We can use a failed response, if one exists.
+                if ($e->getResponse()) {
+                    $response = $e->getResponse();
+                } else {
+                    $this->debug($e->getMessage());
 
-                return false;
+                    return false;
+                }
+            }
+            $cluster = 
$response->getHeaderAsArray($this->config->get('service.header_prefix') . 
'-cluster');
+            $canCache = !empty($cluster)
+                || ($response->getStatusCode() >= 200 && 
$response->getStatusCode() < 300);
+            if ($canCache) {
+                $this->cache->save($cacheKey, $cluster, 86400);
             }
         }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/platformsh-cli-3.33.0/src/Util/YamlParser.php 
new/platformsh-cli-3.33.4/src/Util/YamlParser.php
--- old/platformsh-cli-3.33.0/src/Util/YamlParser.php   2018-05-16 
18:47:49.000000000 +0200
+++ new/platformsh-cli-3.33.4/src/Util/YamlParser.php   2018-06-18 
11:34:30.000000000 +0200
@@ -110,7 +110,7 @@
         if ($item instanceof TaggedValue) {
             $tag = $item->getTag();
             $value = $item->getValue();
-        } elseif (is_string($item) && $item[0] === '!' && 
preg_match('/\!([a-z]+)[ \t]+(.+)$/i', $item, $matches)) {
+        } elseif (is_string($item) && strlen($item) && $item[0] === '!' && 
preg_match('/\!([a-z]+)[ \t]+(.+)$/i', $item, $matches)) {
             $tag = $matches[1];
             $value = Yaml::parse($matches[2]);
             if (!is_string($value)) {

++++++ 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     2018-05-16 21:59:31.431404042 +0200
+++ new/vendor/autoload.php     2018-06-19 01:33:23.977956169 +0200
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer/autoload_real.php';
 
-return ComposerAutoloaderInit223df01762ee6625803aefa4e7d54ccb::getLoader();
+return ComposerAutoloaderInitee6562257b7cb4d29cd1afcfd236ead9::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       2018-05-16 21:59:31.431404042 
+0200
+++ new/vendor/composer/autoload_real.php       2018-06-19 01:33:23.977956169 
+0200
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInit223df01762ee6625803aefa4e7d54ccb
+class ComposerAutoloaderInitee6562257b7cb4d29cd1afcfd236ead9
 {
     private static $loader;
 
@@ -19,15 +19,15 @@
             return self::$loader;
         }
 
-        
spl_autoload_register(array('ComposerAutoloaderInit223df01762ee6625803aefa4e7d54ccb',
 'loadClassLoader'), true, true);
+        
spl_autoload_register(array('ComposerAutoloaderInitee6562257b7cb4d29cd1afcfd236ead9',
 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        
spl_autoload_unregister(array('ComposerAutoloaderInit223df01762ee6625803aefa4e7d54ccb',
 'loadClassLoader'));
+        
spl_autoload_unregister(array('ComposerAutoloaderInitee6562257b7cb4d29cd1afcfd236ead9',
 '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\ComposerStaticInit223df01762ee6625803aefa4e7d54ccb::getInitializer($loader));
+            
call_user_func(\Composer\Autoload\ComposerStaticInitee6562257b7cb4d29cd1afcfd236ead9::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\ComposerStaticInit223df01762ee6625803aefa4e7d54ccb::$files;
+            $includeFiles = 
Composer\Autoload\ComposerStaticInitee6562257b7cb4d29cd1afcfd236ead9::$files;
         } else {
             $includeFiles = require __DIR__ . '/autoload_files.php';
         }
         foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequire223df01762ee6625803aefa4e7d54ccb($fileIdentifier, 
$file);
+            composerRequireee6562257b7cb4d29cd1afcfd236ead9($fileIdentifier, 
$file);
         }
 
         return $loader;
     }
 }
 
-function composerRequire223df01762ee6625803aefa4e7d54ccb($fileIdentifier, 
$file)
+function composerRequireee6562257b7cb4d29cd1afcfd236ead9($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     2018-05-16 21:59:31.431404042 
+0200
+++ new/vendor/composer/autoload_static.php     2018-06-19 01:33:23.977956169 
+0200
@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInit223df01762ee6625803aefa4e7d54ccb
+class ComposerStaticInitee6562257b7cb4d29cd1afcfd236ead9
 {
     public static $files = array (
         '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . 
'/symfony/polyfill-mbstring/bootstrap.php',
@@ -195,9 +195,9 @@
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = 
ComposerStaticInit223df01762ee6625803aefa4e7d54ccb::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = 
ComposerStaticInit223df01762ee6625803aefa4e7d54ccb::$prefixDirsPsr4;
-            $loader->classMap = 
ComposerStaticInit223df01762ee6625803aefa4e7d54ccb::$classMap;
+            $loader->prefixLengthsPsr4 = 
ComposerStaticInitee6562257b7cb4d29cd1afcfd236ead9::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = 
ComposerStaticInitee6562257b7cb4d29cd1afcfd236ead9::$prefixDirsPsr4;
+            $loader->classMap = 
ComposerStaticInitee6562257b7cb4d29cd1afcfd236ead9::$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  2018-05-16 21:59:30.843398848 +0200
+++ new/vendor/composer/installed.json  2018-06-19 01:33:23.257949473 +0200
@@ -486,7 +486,7 @@
         ],
         "authors": [
             {
-                "name": "Padraic Brady",
+                "name": "Pádraic Brady",
                 "email": "padraic.br...@gmail.com",
                 "homepage": "http://blog.astrumfutura.com";
             }
@@ -1109,27 +1109,27 @@
     },
     {
         "name": "stecman/symfony-console-completion",
-        "version": "0.7.0",
-        "version_normalized": "0.7.0.0",
+        "version": "0.8.0",
+        "version_normalized": "0.8.0.0",
         "source": {
             "type": "git",
             "url": "https://github.com/stecman/symfony-console-completion.git";,
-            "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb"
+            "reference": "cd738867503477e91dbe84173dfabd431c883431"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/stecman/symfony-console-completion/zipball/5461d43e53092b3d3b9dbd9d999f2054730f4bbb";,
-            "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb",
+            "url": 
"https://api.github.com/repos/stecman/symfony-console-completion/zipball/cd738867503477e91dbe84173dfabd431c883431";,
+            "reference": "cd738867503477e91dbe84173dfabd431c883431",
             "shasum": ""
         },
         "require": {
             "php": ">=5.3.2",
-            "symfony/console": "~2.3 || ~3.0"
+            "symfony/console": "~2.3 || ~3.0 || ~4.0"
         },
         "require-dev": {
-            "phpunit/phpunit": "~4.4"
+            "phpunit/phpunit": "~4.8.36 || ~5.7 || ~6.4"
         },
-        "time": "2016-02-24T05:08:54+00:00",
+        "time": "2018-02-10T04:28:01+00:00",
         "type": "library",
         "extra": {
             "branch-alias": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/stecman/symfony-console-completion/.travis.yml 
new/vendor/stecman/symfony-console-completion/.travis.yml
--- old/vendor/stecman/symfony-console-completion/.travis.yml   2016-02-24 
06:08:54.000000000 +0100
+++ new/vendor/stecman/symfony-console-completion/.travis.yml   2018-02-10 
05:28:01.000000000 +0100
@@ -2,13 +2,19 @@
 
 matrix:
   include:
-    - php: 5.3
     - php: 5.4
     - php: 5.5
       env: COMPOSER_OPTS="--prefer-lowest"
     - php: 5.6
     - php: 7.0
+    - php: 7.1
+    - php: 7.2
+    - php: nightly
     - php: hhvm
+      env: COMPOSER_OPTS="--prefer-lowest"
+
+  allow_failures:
+    - php: nightly
 
 before_install:
   - sudo apt-get update -qq
@@ -19,4 +25,4 @@
   - composer update $COMPOSER_OPTS
 
 script:
-  - phpunit tests
+  - vendor/bin/phpunit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/vendor/stecman/symfony-console-completion/README.md 
new/vendor/stecman/symfony-console-completion/README.md
--- old/vendor/stecman/symfony-console-completion/README.md     2016-02-24 
06:08:54.000000000 +0100
+++ new/vendor/stecman/symfony-console-completion/README.md     2018-02-10 
05:28:01.000000000 +0100
@@ -23,31 +23,43 @@
    $ composer require stecman/symfony-console-completion
    ```
 
-2. Add an instance of `CompletionCommand` to your application's 
`Application::getDefaultCommands()` method:
+2. For standalone Symfony Console applications, add an instance of 
`CompletionCommand` to your application's `Application::getDefaultCommands()` 
method:
 
-  ```php
-  protected function getDefaultCommands()
-  {
-     //...
-      $commands[] = new 
\Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand();
-     //...
-  }
-  ```
+   ```php
+   protected function getDefaultCommands()
+   {
+      //...
+       $commands[] = new 
\Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand();
+      //...
+   }
+   ```
+
+   For Symfony Framework applications, register the `CompletionCommand` as a 
service in `app/config/services.yml`:
+
+   ```yaml
+   services:
+   #...
+       console.completion_command:
+         class: 
Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand
+         tags:
+             -  { name: console.command }
+   #...
+   ```
 
 3. Register completion for your application by running one of the following in 
a terminal, replacing `[program]` with the command you use to run your 
application (eg. 'composer'):
 
-  ```bash
-  # BASH ~4.x, ZSH
-  source <([program] _completion --generate-hook)
-
-  # BASH ~3.x, ZSH
-  [program] _completion --generate-hook | source /dev/stdin
-
-  # BASH (any version)
-  eval $([program] _completion --generate-hook)
-  ```
+   ```bash
+   # BASH ~4.x, ZSH
+   source <([program] _completion --generate-hook)
 
-  By default this registers completion for the absolute path to you 
application, which will work if the program on accessible on your PATH. You can 
specify a program name to complete for instead using the `--program` option, 
which is required if you're using an alias to run the program.
+   # BASH ~3.x, ZSH
+   [program] _completion --generate-hook | source /dev/stdin
+
+   # BASH (any version)
+   eval $([program] _completion --generate-hook)
+   ```
+
+   By default this registers completion for the absolute path to you 
application, which will work if the program on accessible on your PATH. You can 
specify a program name to complete for instead using the `--program` option, 
which is required if you're using an alias to run the program.
 
 4. If you want the completion to apply automatically for all new shell 
sessions, add the command from step 3 to your shell's profile (eg. 
`~/.bash_profile` or `~/.zshrc`)
 
@@ -71,7 +83,7 @@
 class MyCommand extends Command implements CompletionAwareInterface
 {
     ...
-    
+
     public function completeOptionValues($optionName, CompletionContext 
$context)
     {
         if ($optionName == 'some-option') {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/stecman/symfony-console-completion/composer.json 
new/vendor/stecman/symfony-console-completion/composer.json
--- old/vendor/stecman/symfony-console-completion/composer.json 2016-02-24 
06:08:54.000000000 +0100
+++ new/vendor/stecman/symfony-console-completion/composer.json 2018-02-10 
05:28:01.000000000 +0100
@@ -10,10 +10,10 @@
     ],
     "require": {
         "php": ">=5.3.2",
-        "symfony/console": "~2.3 || ~3.0"
+        "symfony/console": "~2.3 || ~3.0 || ~4.0"
     },
     "require-dev": {
-        "phpunit/phpunit": "~4.4"
+        "phpunit/phpunit": "~4.8.36 || ~5.7 || ~6.4"
     },
     "autoload": {
         "psr-4": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/stecman/symfony-console-completion/src/CompletionCommand.php 
new/vendor/stecman/symfony-console-completion/src/CompletionCommand.php
--- old/vendor/stecman/symfony-console-completion/src/CompletionCommand.php     
2016-02-24 06:08:54.000000000 +0100
+++ new/vendor/stecman/symfony-console-completion/src/CompletionCommand.php     
2018-02-10 05:28:01.000000000 +0100
@@ -33,6 +33,12 @@
 
 END
             );
+
+        // Hide this command from listing if supported
+        // Command::setHidden() was not available before Symfony 3.2.0
+        if (method_exists($this, 'setHidden')) {
+            $this->setHidden(true);
+        }
     }
 
     /**
@@ -56,8 +62,7 @@
             $alias = $input->getOption('program');
             $multiple = (bool)$input->getOption('multiple');
 
-            // When completing for multiple apps having absolute path in the 
alias doesn't make sense.
-            if (!$alias && $multiple) {
+            if (!$alias) {
                 $alias = basename($program);
             }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/stecman/symfony-console-completion/src/CompletionHandler.php 
new/vendor/stecman/symfony-console-completion/src/CompletionHandler.php
--- old/vendor/stecman/symfony-console-completion/src/CompletionHandler.php     
2016-02-24 06:08:54.000000000 +0100
+++ new/vendor/stecman/symfony-console-completion/src/CompletionHandler.php     
2018-02-10 05:28:01.000000000 +0100
@@ -39,12 +39,13 @@
         $this->application = $application;
         $this->context = $context;
 
+        // Set up completions for commands that are built-into Application
         $this->addHandler(
             new Completion(
                 'help',
                 'command_name',
                 Completion::TYPE_ARGUMENT,
-                array_keys($application->all())
+                $this->getCommandNames()
             )
         );
 
@@ -256,14 +257,7 @@
     protected function completeForCommandName()
     {
         if (!$this->command || (count($this->context->getWords()) == 2 && 
$this->context->getWordIndex() == 1)) {
-            $commands = $this->application->all();
-            $names = array_keys($commands);
-
-            if ($key = array_search('_completion', $names)) {
-                unset($names[$key]);
-            }
-
-            return $names;
+            return $this->getCommandNames();
         }
 
         return false;
@@ -442,4 +436,37 @@
             $this->application->getDefinition()->getOptions()
         );
     }
+
+    /**
+     * Get command names available for completion
+     *
+     * Filters out hidden commands where supported.
+     *
+     * @return string[]
+     */
+    protected function getCommandNames()
+    {
+        // Command::Hidden isn't supported before Symfony Console 3.2.0
+        // We don't complete hidden command names as these are intended to be 
private
+        if (method_exists('\Symfony\Component\Console\Command\Command', 
'isHidden')) {
+            $commands = array();
+
+            foreach ($this->application->all() as $name => $command) {
+                if (!$command->isHidden()) {
+                    $commands[] = $name;
+                }
+            }
+
+            return $commands;
+
+        } else {
+
+            // Fallback for compatibility with Symfony Console < 3.2.0
+            // This was the behaviour prior to pull #75
+            $commands = $this->application->all();
+            unset($commands['_completion']);
+
+            return array_keys($commands);
+        }
+    }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/Common/CompletionHandlerTestCase.php
 
new/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/Common/CompletionHandlerTestCase.php
--- 
old/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/Common/CompletionHandlerTestCase.php
   2016-02-24 06:08:54.000000000 +0100
+++ 
new/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/Common/CompletionHandlerTestCase.php
   2018-02-10 05:28:01.000000000 +0100
@@ -2,6 +2,7 @@
 
 namespace Stecman\Component\Symfony\Console\BashCompletion\Tests\Common;
 
+use PHPUnit\Framework\TestCase;
 use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
 use Stecman\Component\Symfony\Console\BashCompletion\CompletionHandler;
 use Symfony\Component\Console\Application;
@@ -9,7 +10,7 @@
 /**
  * Base test case for running CompletionHandlers
  */
-abstract class CompletionHandlerTestCase extends \PHPUnit_Framework_TestCase
+abstract class CompletionHandlerTestCase extends TestCase
 {
     /**
      * @var Application
@@ -19,6 +20,7 @@
     public static function setUpBeforeClass()
     {
         require_once __DIR__ . '/../Fixtures/CompletionAwareCommand.php';
+        require_once __DIR__ . '/../Fixtures/HiddenCommand.php';
         require_once __DIR__ . '/../Fixtures/TestBasicCommand.php';
         require_once __DIR__ . '/../Fixtures/TestSymfonyStyleCommand.php';
     }
@@ -31,6 +33,10 @@
             new \TestBasicCommand(),
             new \TestSymfonyStyleCommand()
         ));
+
+        if (method_exists('\HiddenCommand', 'setHidden')) {
+            $this->application->add(new \HiddenCommand());
+        }
     }
 
     /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionContextTest.php
 
new/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionContextTest.php
--- 
old/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionContextTest.php
      2016-02-24 06:08:54.000000000 +0100
+++ 
new/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionContextTest.php
      2018-02-10 05:28:01.000000000 +0100
@@ -2,10 +2,11 @@
 
 namespace Stecman\Component\Symfony\Console\BashCompletion\Tests;
 
+use PHPUnit\Framework\TestCase;
 use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
 use 
Stecman\Component\Symfony\Console\BashCompletion\EnvironmentCompletionContext;
 
-class CompletionContextTest extends \PHPUnit_Framework_TestCase
+class CompletionContextTest extends TestCase
 {
 
     public function testWordBreakSplit()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/Fixtures/HiddenCommand.php
 
new/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/Fixtures/HiddenCommand.php
--- 
old/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/Fixtures/HiddenCommand.php
     1970-01-01 01:00:00.000000000 +0100
+++ 
new/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/Fixtures/HiddenCommand.php
     2018-02-10 05:28:01.000000000 +0100
@@ -0,0 +1,11 @@
+<?php
+
+
+class HiddenCommand extends \Symfony\Component\Console\Command\Command
+{
+    protected function configure()
+    {
+        $this->setName('internals')
+            ->setHidden(true);
+    }
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/HookFactoryTest.php
 
new/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/HookFactoryTest.php
--- 
old/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/HookFactoryTest.php
    2016-02-24 06:08:54.000000000 +0100
+++ 
new/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/HookFactoryTest.php
    2018-02-10 05:28:01.000000000 +0100
@@ -2,9 +2,10 @@
 
 namespace Stecman\Component\Symfony\Console\BashCompletion\Tests;
 
+use PHPUnit\Framework\TestCase;
 use Stecman\Component\Symfony\Console\BashCompletion\HookFactory;
 
-class HookFactoryTest extends \PHPUnit_Framework_TestCase
+class HookFactoryTest extends TestCase
 {
     /**
      * @var HookFactory
@@ -91,9 +92,7 @@
 
             $status = proc_close($process);
 
-            if ($status !== 0) {
-                $this->fail("Syntax check for $context failed:\n$output");
-            }
+            $this->assertSame(0, $status, "Syntax check for $context 
failed:\n$output");
         } else {
             throw new \RuntimeException("Failed to start process with command 
'$syntaxCheckCommand'");
         }


Reply via email to