Hello community, here is the log from the commit of package platformsh-cli for openSUSE:Factory checked in at 2018-09-07 15:41:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/platformsh-cli (Old) and /work/SRC/openSUSE:Factory/.platformsh-cli.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "platformsh-cli" Fri Sep 7 15:41:45 2018 rev:53 rq:633745 version:3.34.2 Changes: -------- --- /work/SRC/openSUSE:Factory/platformsh-cli/platformsh-cli.changes 2018-07-22 23:05:13.040908776 +0200 +++ /work/SRC/openSUSE:Factory/.platformsh-cli.new/platformsh-cli.changes 2018-09-07 15:41:50.938378930 +0200 @@ -1,0 +2,10 @@ +Thu Sep 06 12:45:02 UTC 2018 - [email protected] + +- Update to version 3.34.2: + * Release v3.34.2 + * Always refresh resources when an operation is not available (#740) + * Fix --start option in activity:list + * Prefer .bash_profile over .bashrc on OS X + * Make the installer interactive if possible + +------------------------------------------------------------------- Old: ---- platformsh-cli-3.34.1.tar.xz New: ---- platformsh-cli-3.34.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ platformsh-cli.spec ++++++ --- /var/tmp/diff_new_pack.2Sioru/_old 2018-09-07 15:41:51.674378142 +0200 +++ /var/tmp/diff_new_pack.2Sioru/_new 2018-09-07 15:41:51.674378142 +0200 @@ -17,7 +17,7 @@ Name: platformsh-cli -Version: 3.34.1 +Version: 3.34.2 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.2Sioru/_old 2018-09-07 15:41:51.694378121 +0200 +++ /var/tmp/diff_new_pack.2Sioru/_new 2018-09-07 15:41:51.694378121 +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.34.1</param> + <param name="revision">refs/tags/v3.34.2</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.2Sioru/_old 2018-09-07 15:41:51.710378103 +0200 +++ /var/tmp/diff_new_pack.2Sioru/_new 2018-09-07 15:41:51.710378103 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/platformsh/platformsh-cli.git</param> - <param name="changesrevision">eaa40edf86cb91fda00fe8a0ee2a4f918dab26bf</param> + <param name="changesrevision">c21b6c078fc8b805042b73307cd81f6228c1432f</param> </service> </servicedata> ++++++ licenses.txt ++++++ --- /var/tmp/diff_new_pack.2Sioru/_old 2018-09-07 15:41:51.746378065 +0200 +++ /var/tmp/diff_new_pack.2Sioru/_new 2018-09-07 15:41:51.746378065 +0200 @@ -17,7 +17,7 @@ padraic/humbug_get_contents 1.1.2 BSD-3-Clause padraic/phar-updater v1.0.5 BSD-3-Clause paragonie/random_compat v2.0.11 MIT -platformsh/client v0.19.0 MIT +platformsh/client v0.19.2 MIT platformsh/console-form v0.0.20 MIT psr/container 1.0.0 MIT psr/log 1.0.2 MIT ++++++ platformsh-cli-3.34.1.tar.xz -> platformsh-cli-3.34.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/composer.json new/platformsh-cli-3.34.2/composer.json --- old/platformsh-cli-3.34.1/composer.json 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/composer.json 2018-09-06 12:10:02.000000000 +0200 @@ -8,7 +8,7 @@ "guzzlehttp/guzzle": "^5.3", "guzzlehttp/ringphp": "^1.1", "platformsh/console-form": ">=0.0.20 <2.0", - "platformsh/client": ">=0.19.0 <2.0", + "platformsh/client": ">=0.19.2 <2.0", "symfony/console": "^3.0 >=3.2", "symfony/yaml": "^3.0 || ^2.6", "symfony/finder": "^3.0", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/composer.lock new/platformsh-cli-3.34.2/composer.lock --- old/platformsh-cli-3.34.1/composer.lock 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/composer.lock 2018-09-06 12:10:02.000000000 +0200 @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "38dce8ffb407b4a7fc74e245f72c3c2a", + "content-hash": "e9b445a5db6a43d3c8cf702109407a99", "packages": [ { "name": "cocur/slugify", @@ -711,16 +711,16 @@ }, { "name": "platformsh/client", - "version": "v0.19.0", + "version": "v0.19.2", "source": { "type": "git", "url": "https://github.com/platformsh/platformsh-client-php.git", - "reference": "e5baf70609b6fe47fac22e8f6cee364112d548f0" + "reference": "678f057067174c3b2c6716168bc86060a3f10097" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/e5baf70609b6fe47fac22e8f6cee364112d548f0", - "reference": "e5baf70609b6fe47fac22e8f6cee364112d548f0", + "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/678f057067174c3b2c6716168bc86060a3f10097", + "reference": "678f057067174c3b2c6716168bc86060a3f10097", "shasum": "" }, "require": { @@ -756,7 +756,7 @@ } ], "description": "Platform.sh API client", - "time": "2018-05-16T13:05:28+00:00" + "time": "2018-08-23T09:40:35+00:00" }, { "name": "platformsh/console-form", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/config.yaml new/platformsh-cli-3.34.2/config.yaml --- old/platformsh-cli-3.34.1/config.yaml 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/config.yaml 2018-09-06 12:10:02.000000000 +0200 @@ -1,7 +1,7 @@ # Metadata about the CLI application itself. application: name: 'Platform.sh CLI' - version: '3.34.1' + version: '3.34.2' 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.34.1/dist/installer.php new/platformsh-cli-3.34.2/dist/installer.php --- old/platformsh-cli-3.34.1/dist/installer.php 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/dist/installer.php 2018-09-06 12:10:02.000000000 +0200 @@ -217,15 +217,16 @@ } } -output(PHP_EOL . ' Running self:install command...'); +output(PHP_EOL . ' Running self:install command...' . PHP_EOL); putenv('CLICOLOR_FORCE=' . (is_ansi() ? '1' : '0')); -exec('php ' . $pharPath . ' self:install --yes 2>&1', $output, $return_var); -output(preg_replace('/^/m', ' ', implode(PHP_EOL, $output))); -if ($return_var === 0) { - output(PHP_EOL . ' The installation completed successfully.'); -} else { - exit($return_var); +$commandline = 'php ' . $pharPath . ' self:install'; +if (!is_interactive()) { + $commandline .= ' --yes'; } +$process = proc_open($commandline, [STDIN, STDOUT, STDERR], $pipes); +$result = proc_close($process); + +exit($result); /** * Checks a condition, outputs a message, and exits if failed. @@ -307,6 +308,25 @@ } /** + * Returns whether the terminal is interactive. + * + * @return bool + */ +function is_interactive() +{ + global $argv; + if (!empty($argv) && array_intersect(['--no-interaction', '-y', '--yes'], $argv)) { + return false; + } + + if (function_exists('posix_isatty')) { + return posix_isatty(STDOUT) && posix_isatty(STDERR); + } + + return true; +} + +/** * Finds the user's home directory. * * @return string|false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/dist/manifest.json new/platformsh-cli-3.34.2/dist/manifest.json --- old/platformsh-cli-3.34.1/dist/manifest.json 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/dist/manifest.json 2018-09-06 12:10:02.000000000 +0200 @@ -1,10 +1,10 @@ [ { "name": "platform.phar", - "sha1": "6d3a81e1ee934ab2b7e67230f26c665aa9401984", - "sha256": "53cfbd8255270f9f12b2e5cf9882ea3a9094866bcde19de406ddf676c114d1fa", - "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.34.1/platform.phar", - "version": "3.34.1", + "sha1": "c14d2c03696499304634abfea9e027286a152c05", + "sha256": "11b35014067a096b65f73ee506eb8d40f8baca9cb9dc23e73c3b7d0b512182bb", + "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.34.2/platform.phar", + "version": "3.34.2", "php": { "min": "5.5.9" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/src/Command/Activity/ActivityListCommand.php new/platformsh-cli-3.34.2/src/Command/Activity/ActivityListCommand.php --- old/platformsh-cli-3.34.1/src/Command/Activity/ActivityListCommand.php 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/src/Command/Activity/ActivityListCommand.php 2018-09-06 12:10:02.000000000 +0200 @@ -59,8 +59,9 @@ $apiResource = $project; } - $activities = []; $type = $input->getOption('type'); + $activities = $apiResource->getActivities($limit, $type, $startsAt); + $progress = new ProgressBar($output->isDecorated() ? $this->stdErr : new NullOutput()); $progress->setMessage('Loading activities...'); $progress->setFormat('%message% %current% (max: %max%)'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/src/Command/Environment/EnvironmentActivateCommand.php new/platformsh-cli-3.34.2/src/Command/Environment/EnvironmentActivateCommand.php --- old/platformsh-cli-3.34.1/src/Command/Environment/EnvironmentActivateCommand.php 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/src/Command/Environment/EnvironmentActivateCommand.php 2018-09-06 12:10:02.000000000 +0200 @@ -67,7 +67,7 @@ /** @var \Platformsh\Cli\Service\QuestionHelper $questionHelper */ $questionHelper = $this->getService('question_helper'); foreach ($environments as $environment) { - if (!$this->api()->checkEnvironmentOperation('activate', $environment)) { + if (!$environment->operationAvailable('activate', true)) { if ($environment->isActive()) { $output->writeln("The environment " . $this->api()->getEnvironmentLabel($environment) . " is already active."); $count--; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/src/Command/Environment/EnvironmentBranchCommand.php new/platformsh-cli-3.34.2/src/Command/Environment/EnvironmentBranchCommand.php --- old/platformsh-cli-3.34.1/src/Command/Environment/EnvironmentBranchCommand.php 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/src/Command/Environment/EnvironmentBranchCommand.php 2018-09-06 12:10:02.000000000 +0200 @@ -82,13 +82,10 @@ return 1; } - if (!$this->api()->checkEnvironmentOperation('branch', $parentEnvironment)) { + if (!$parentEnvironment->operationAvailable('branch', true)) { $this->stdErr->writeln( "Operation not available: The environment " . $this->api()->getEnvironmentLabel($parentEnvironment, 'error') . " can't be branched." ); - if ($parentEnvironment->is_dirty) { - $this->api()->clearEnvironmentsCache($selectedProject->id); - } return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/src/Command/Environment/EnvironmentMergeCommand.php new/platformsh-cli-3.34.2/src/Command/Environment/EnvironmentMergeCommand.php --- old/platformsh-cli-3.34.1/src/Command/Environment/EnvironmentMergeCommand.php 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/src/Command/Environment/EnvironmentMergeCommand.php 2018-09-06 12:10:02.000000000 +0200 @@ -32,7 +32,7 @@ $selectedEnvironment = $this->getSelectedEnvironment(); $environmentId = $selectedEnvironment->id; - if (!$this->api()->checkEnvironmentOperation('merge', $selectedEnvironment)) { + if (!$selectedEnvironment->operationAvailable('merge', true)) { $this->stdErr->writeln(sprintf( "Operation not available: The environment <error>%s</error> can't be merged.", $environmentId diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/src/Command/Environment/EnvironmentSynchronizeCommand.php new/platformsh-cli-3.34.2/src/Command/Environment/EnvironmentSynchronizeCommand.php --- old/platformsh-cli-3.34.1/src/Command/Environment/EnvironmentSynchronizeCommand.php 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/src/Command/Environment/EnvironmentSynchronizeCommand.php 2018-09-06 12:10:02.000000000 +0200 @@ -43,13 +43,10 @@ $selectedEnvironment = $this->getSelectedEnvironment(); $environmentId = $selectedEnvironment->id; - if (!$this->api()->checkEnvironmentOperation('synchronize', $selectedEnvironment)) { + if (!$selectedEnvironment->operationAvailable('synchronize', true)) { $this->stdErr->writeln( "Operation not available: The environment <error>$environmentId</error> can't be synchronized." ); - if ($selectedEnvironment->is_dirty) { - $this->api()->clearEnvironmentsCache($selectedEnvironment->project); - } return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/src/Command/Self/SelfInstallCommand.php new/platformsh-cli-3.34.2/src/Command/Self/SelfInstallCommand.php --- old/platformsh-cli-3.34.1/src/Command/Self/SelfInstallCommand.php 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/src/Command/Self/SelfInstallCommand.php 2018-09-06 12:10:02.000000000 +0200 @@ -3,6 +3,7 @@ use Platformsh\Cli\Command\CommandBase; use Platformsh\Cli\Service\Filesystem; +use Platformsh\Cli\Util\OsUtil; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -309,10 +310,20 @@ '.bashrc', '.bash_profile', ]; + + // OS X ignores .bashrc if .bash_profile is present. + if (OsUtil::isOsX()) { + $candidates = [ + '.bash_profile', + '.bashrc', + ]; + } + if ($shell === 'zsh' || getenv('ZSH')) { array_unshift($candidates, '.zshrc'); array_unshift($candidates, '.zprofile'); } + $homeDir = Filesystem::getHomeDirectory(); foreach ($candidates as $candidate) { if (file_exists($homeDir . DIRECTORY_SEPARATOR . $candidate)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/src/Command/Snapshot/SnapshotCreateCommand.php new/platformsh-cli-3.34.2/src/Command/Snapshot/SnapshotCreateCommand.php --- old/platformsh-cli-3.34.1/src/Command/Snapshot/SnapshotCreateCommand.php 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/src/Command/Snapshot/SnapshotCreateCommand.php 2018-09-06 12:10:02.000000000 +0200 @@ -29,13 +29,10 @@ $selectedEnvironment = $this->getSelectedEnvironment(); $environmentId = $selectedEnvironment->id; - if (!$this->api()->checkEnvironmentOperation('backup', $selectedEnvironment)) { + if (!$selectedEnvironment->operationAvailable('backup', true)) { $this->stdErr->writeln( "Operation not available: cannot create a snapshot of <error>$environmentId</error>" ); - if ($selectedEnvironment->is_dirty) { - $this->api()->clearEnvironmentsCache($selectedEnvironment->project); - } return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/src/Command/Snapshot/SnapshotRestoreCommand.php new/platformsh-cli-3.34.2/src/Command/Snapshot/SnapshotRestoreCommand.php --- old/platformsh-cli-3.34.1/src/Command/Snapshot/SnapshotRestoreCommand.php 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/src/Command/Snapshot/SnapshotRestoreCommand.php 2018-09-06 12:10:02.000000000 +0200 @@ -62,7 +62,7 @@ $selectedActivity = reset($snapshotActivities); } - if (!$selectedActivity->operationAvailable('restore')) { + if (!$selectedActivity->operationAvailable('restore', true)) { if (!$selectedActivity->isComplete()) { $this->stdErr->writeln("The snapshot is not complete, so it cannot be restored"); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.1/src/Service/Api.php new/platformsh-cli-3.34.2/src/Service/Api.php --- old/platformsh-cli-3.34.1/src/Service/Api.php 2018-07-20 15:19:57.000000000 +0200 +++ new/platformsh-cli-3.34.2/src/Service/Api.php 2018-09-06 12:10:02.000000000 +0200 @@ -898,29 +898,6 @@ } /** - * Checks if an operation is available on an environment. - * - * This auto-refreshes the environment data if the operation is not - * available. - * - * @param string $op - * @param \Platformsh\Client\Model\Environment $environment - * - * @return bool - */ - public function checkEnvironmentOperation($op, Environment $environment) - { - if ($environment->operationAvailable($op)) { - return true; - } - - $refresh = self::$environmentsCacheRefreshed ? null : true; - $environment = $this->getEnvironment($environment->id, $this->getProject($environment->project), $refresh); - - return $environment->operationAvailable($op); - } - - /** * React on an API 403 request. * * @param \GuzzleHttp\Event\ErrorEvent $event ++++++ 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-07-21 05:47:10.121916063 +0200 +++ new/vendor/autoload.php 2018-09-06 14:45:07.070740165 +0200 @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit00621416e04f9e641fcf6b9c661708d9::getLoader(); +return ComposerAutoloaderInita727df1fa9354e27c13787d0f95cb5f6::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-07-21 05:47:10.121916063 +0200 +++ new/vendor/composer/autoload_real.php 2018-09-06 14:45:07.070740165 +0200 @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit00621416e04f9e641fcf6b9c661708d9 +class ComposerAutoloaderInita727df1fa9354e27c13787d0f95cb5f6 { private static $loader; @@ -19,15 +19,15 @@ return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit00621416e04f9e641fcf6b9c661708d9', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInita727df1fa9354e27c13787d0f95cb5f6', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit00621416e04f9e641fcf6b9c661708d9', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInita727df1fa9354e27c13787d0f95cb5f6', '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\ComposerStaticInit00621416e04f9e641fcf6b9c661708d9::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6::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\ComposerStaticInit00621416e04f9e641fcf6b9c661708d9::$files; + $includeFiles = Composer\Autoload\ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire00621416e04f9e641fcf6b9c661708d9($fileIdentifier, $file); + composerRequirea727df1fa9354e27c13787d0f95cb5f6($fileIdentifier, $file); } return $loader; } } -function composerRequire00621416e04f9e641fcf6b9c661708d9($fileIdentifier, $file) +function composerRequirea727df1fa9354e27c13787d0f95cb5f6($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-07-21 05:47:10.121916063 +0200 +++ new/vendor/composer/autoload_static.php 2018-09-06 14:45:07.070740165 +0200 @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit00621416e04f9e641fcf6b9c661708d9 +class ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6 { 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 = ComposerStaticInit00621416e04f9e641fcf6b9c661708d9::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit00621416e04f9e641fcf6b9c661708d9::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit00621416e04f9e641fcf6b9c661708d9::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6::$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-07-21 05:47:09.525910783 +0200 +++ new/vendor/composer/installed.json 2018-09-06 14:45:06.090730993 +0200 @@ -730,17 +730,17 @@ }, { "name": "platformsh/client", - "version": "v0.19.0", - "version_normalized": "0.19.0.0", + "version": "v0.19.2", + "version_normalized": "0.19.2.0", "source": { "type": "git", "url": "https://github.com/platformsh/platformsh-client-php.git", - "reference": "e5baf70609b6fe47fac22e8f6cee364112d548f0" + "reference": "678f057067174c3b2c6716168bc86060a3f10097" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/e5baf70609b6fe47fac22e8f6cee364112d548f0", - "reference": "e5baf70609b6fe47fac22e8f6cee364112d548f0", + "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/678f057067174c3b2c6716168bc86060a3f10097", + "reference": "678f057067174c3b2c6716168bc86060a3f10097", "shasum": "" }, "require": { @@ -753,7 +753,7 @@ "require-dev": { "phpunit/phpunit": "~4.5" }, - "time": "2018-05-16T13:05:28+00:00", + "time": "2018-08-23T09:40:35+00:00", "type": "library", "extra": { "patches": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/platformsh/client/src/Connection/Connector.php new/vendor/platformsh/client/src/Connection/Connector.php --- old/vendor/platformsh/client/src/Connection/Connector.php 2018-05-16 15:05:28.000000000 +0200 +++ new/vendor/platformsh/client/src/Connection/Connector.php 2018-08-23 11:40:35.000000000 +0200 @@ -57,7 +57,7 @@ $url = 'https://github.com/platformsh/platformsh-client-php'; $defaults = [ - 'accounts' => 'https://accounts.platform.sh/api/platform/', + 'accounts' => 'https://accounts.platform.sh/api/v1/', 'client_id' => 'platformsh-client-php', 'client_secret' => '', 'debug' => false, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/platformsh/client/src/Model/Deployment/AppBase.php new/vendor/platformsh/client/src/Model/Deployment/AppBase.php --- old/vendor/platformsh/client/src/Model/Deployment/AppBase.php 2018-05-16 15:05:28.000000000 +0200 +++ new/vendor/platformsh/client/src/Model/Deployment/AppBase.php 2018-08-23 11:40:35.000000000 +0200 @@ -7,10 +7,18 @@ /** * An application. * - * @property-read string $name - * @property-read string $type - * @property-read array $runtime - * @property-read array $preflight + * @property-read string $name + * @property-read string $type + * + * @property-read array $access + * @property-read int $disk + * @property-read array $mounts + * @property-read array $preflight + * @property-read array $relationships + * @property-read array $runtime + * @property-read string $size + * @property-read string|null $timezone + * @property-read array $variables */ abstract class AppBase { 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 2018-05-16 15:05:28.000000000 +0200 +++ new/vendor/platformsh/client/src/Model/Environment.php 2018-08-23 11:40:35.000000000 +0200 @@ -375,7 +375,16 @@ $options['query']['starts_at'] = Activity::formatStartsAt($startsAt); } - return Activity::getCollection($this->getUri() . '/activities', $limit, $options, $this->client); + $activities = Activity::getCollection($this->getUri() . '/activities', $limit, $options, $this->client); + + // Guarantee the type filter (works around a temporary bug). + if ($type !== null) { + $activities = array_filter($activities, function (Activity $activity) use ($type) { + return $activity->type === $type; + }); + } + + return $activities; } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/platformsh/client/src/Model/Project.php new/vendor/platformsh/client/src/Model/Project.php --- old/vendor/platformsh/client/src/Model/Project.php 2018-05-16 15:05:28.000000000 +0200 +++ new/vendor/platformsh/client/src/Model/Project.php 2018-08-23 11:40:35.000000000 +0200 @@ -135,18 +135,6 @@ } /** - * @inheritdoc - */ - public function operationAvailable($op) - { - if (!parent::operationAvailable($op)) { - $this->ensureFull(); - } - - return parent::operationAvailable($op); - } - - /** * Get a list of environments for the project. * * @param int $limit @@ -273,7 +261,16 @@ $options['query']['starts_at'] = Activity::formatStartsAt($startsAt); } - return Activity::getCollection($this->getUri() . '/activities', $limit, $options, $this->client); + $activities = Activity::getCollection($this->getUri() . '/activities', $limit, $options, $this->client); + + // Guarantee the type filter (works around a temporary bug). + if ($type !== null) { + $activities = array_filter($activities, function (Activity $activity) use ($type) { + return $activity->type === $type; + }); + } + + return $activities; } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/platformsh/client/src/Model/Region.php new/vendor/platformsh/client/src/Model/Region.php --- old/vendor/platformsh/client/src/Model/Region.php 2018-05-16 15:05:28.000000000 +0200 +++ new/vendor/platformsh/client/src/Model/Region.php 2018-08-23 11:40:35.000000000 +0200 @@ -40,13 +40,13 @@ /** * @inheritdoc */ - public function operationAvailable($op) + public function operationAvailable($op, $refreshDuringCheck = false) { if ($op === 'edit') { return true; } - return parent::operationAvailable($op); + return parent::operationAvailable($op, $refreshDuringCheck); } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/platformsh/client/src/Model/Resource.php new/vendor/platformsh/client/src/Model/Resource.php --- old/vendor/platformsh/client/src/Model/Resource.php 2018-05-16 15:05:28.000000000 +0200 +++ new/vendor/platformsh/client/src/Model/Resource.php 2018-08-23 11:40:35.000000000 +0200 @@ -354,7 +354,7 @@ */ protected function runOperation($op, $method = 'post', array $body = []) { - if (!$this->operationAvailable($op)) { + if (!$this->operationAvailable($op, true)) { throw new OperationUnavailableException("Operation not available: $op"); } $options = []; @@ -522,10 +522,41 @@ * Check whether an operation is available on the resource. * * @param string $op + * @param bool $refreshDuringCheck * * @return bool */ - public function operationAvailable($op) + public function operationAvailable($op, $refreshDuringCheck = false) + { + // Ensure this resource is a full representation. + if (!$this->isFull) { + $this->refresh(); + $refreshDuringCheck = false; + } + + // Check if the operation is available in the HAL links. + $available = $this->isOperationAvailable($op); + if ($available) { + return true; + } + + // If not, and $refreshDuringCheck is on, then refresh the resource. + if ($refreshDuringCheck) { + $this->refresh(); + $available = $this->isOperationAvailable($op); + } + + return $available; + } + + /** + * Internal: check whether an operation is available on the resource. + * + * @param string $op + * + * @return bool + */ + private function isOperationAvailable($op) { return isset($this->data['_links']["#$op"]['href']); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/platformsh/client/src/Model/Subscription.php new/vendor/platformsh/client/src/Model/Subscription.php --- old/vendor/platformsh/client/src/Model/Subscription.php 2018-05-16 15:05:28.000000000 +0200 +++ new/vendor/platformsh/client/src/Model/Subscription.php 2018-08-23 11:40:35.000000000 +0200 @@ -171,12 +171,13 @@ /** * @inheritdoc */ - public function operationAvailable($op) + public function operationAvailable($op, $refreshDuringCheck = false) { if ($op === 'edit') { return true; } - return parent::operationAvailable($op); + + return parent::operationAvailable($op, $refreshDuringCheck); } /**
