Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package platformsh-cli for openSUSE:Factory checked in at 2021-03-18 22:54:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/platformsh-cli (Old) and /work/SRC/openSUSE:Factory/.platformsh-cli.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "platformsh-cli" Thu Mar 18 22:54:55 2021 rev:110 rq:879755 version:3.65.4 Changes: -------- --- /work/SRC/openSUSE:Factory/platformsh-cli/platformsh-cli.changes 2021-02-17 18:13:21.662029992 +0100 +++ /work/SRC/openSUSE:Factory/.platformsh-cli.new.2401/platformsh-cli.changes 2021-03-18 22:54:56.575530989 +0100 @@ -1,0 +2,17 @@ +Thu Mar 18 00:22:36 UTC 2021 - ji...@boombatower.com + +- Update to version 3.65.4: + * Release v3.65.4 + * Support indexed SSH URLs (for apps with multiple instances) + * Release v3.65.3 + * Fix proxy settings in Api service (#1041) + * Make the OAuth2 client ID configurable by env var + * Improve worker not found error message when the app name is incorrect + * Fix --worker compatibility for various commands + * Only send the token to obtain the initial redirect + * Fix "Link not found: #manage-access" when checking environment roles + * Fix error "SSH service not available" with build --clone + * Also decode COMPOSER_AUTH + * installer: support using a GitHub token to download assets + +------------------------------------------------------------------- Old: ---- platformsh-cli-3.65.2.tar.xz New: ---- platformsh-cli-3.65.4.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ platformsh-cli.spec ++++++ --- /var/tmp/diff_new_pack.sLQbgH/_old 2021-03-18 22:54:57.239531707 +0100 +++ /var/tmp/diff_new_pack.sLQbgH/_new 2021-03-18 22:54:57.243531711 +0100 @@ -17,7 +17,7 @@ Name: platformsh-cli -Version: 3.65.2 +Version: 3.65.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.sLQbgH/_old 2021-03-18 22:54:57.275531746 +0100 +++ /var/tmp/diff_new_pack.sLQbgH/_new 2021-03-18 22:54:57.275531746 +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.65.2</param> + <param name="revision">refs/tags/v3.65.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.sLQbgH/_old 2021-03-18 22:54:57.291531763 +0100 +++ /var/tmp/diff_new_pack.sLQbgH/_new 2021-03-18 22:54:57.295531767 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/platformsh/platformsh-cli.git</param> - <param name="changesrevision">af88218588143a8770e7087ab1c21133b396a7e0</param> + <param name="changesrevision">32237d959e71aaffe552bff29680b02558779779</param> </service> </servicedata> ++++++ licenses.txt ++++++ --- /var/tmp/diff_new_pack.sLQbgH/_old 2021-03-18 22:54:57.327531802 +0100 +++ /var/tmp/diff_new_pack.sLQbgH/_new 2021-03-18 22:54:57.331531806 +0100 @@ -16,7 +16,7 @@ padraic/phar-updater v1.0.6 BSD-3-Clause paragonie/random_compat v2.0.19 MIT pjcdawkins/guzzle-oauth2-plugin v2.3.1 MIT -platformsh/client 0.41.1 MIT +platformsh/client 0.42.0 MIT platformsh/console-form v0.0.24 MIT psr/container 1.0.0 MIT psr/log 1.1.3 MIT ++++++ platformsh-cli-3.65.2.tar.xz -> platformsh-cli-3.65.4.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.65.2/composer.json new/platformsh-cli-3.65.4/composer.json --- old/platformsh-cli-3.65.2/composer.json 2021-02-16 21:33:37.000000000 +0100 +++ new/platformsh-cli-3.65.4/composer.json 2021-03-17 14:44:30.000000000 +0100 @@ -8,7 +8,7 @@ "guzzlehttp/guzzle": "^5.3", "guzzlehttp/ringphp": "^1.1", "platformsh/console-form": ">=0.0.24 <2.0", - "platformsh/client": ">=0.41.1 <2.0", + "platformsh/client": ">=0.42.0 <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.65.2/composer.lock new/platformsh-cli-3.65.4/composer.lock --- old/platformsh-cli-3.65.2/composer.lock 2021-02-16 21:33:37.000000000 +0100 +++ new/platformsh-cli-3.65.4/composer.lock 2021-03-17 14:44:30.000000000 +0100 @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "923a0c791cf4e828f606a9b37b724e4a", + "content-hash": "67fc026a6a17fa007f3fc47b5b3a907a", "packages": [ { "name": "cocur/slugify", @@ -730,16 +730,16 @@ }, { "name": "platformsh/client", - "version": "0.41.1", + "version": "0.42.0", "source": { "type": "git", "url": "https://github.com/platformsh/platformsh-client-php.git", - "reference": "5be54c7f64de23fe2ce7f2d391fed72edbf88af3" + "reference": "d87cc67684a56fa1c03e520669b03d25539d631c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/5be54c7f64de23fe2ce7f2d391fed72edbf88af3", - "reference": "5be54c7f64de23fe2ce7f2d391fed72edbf88af3", + "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/d87cc67684a56fa1c03e520669b03d25539d631c", + "reference": "d87cc67684a56fa1c03e520669b03d25539d631c", "shasum": "" }, "require": { @@ -771,9 +771,9 @@ "description": "Platform.sh API client", "support": { "issues": "https://github.com/platformsh/platformsh-client-php/issues", - "source": "https://github.com/platformsh/platformsh-client-php/tree/0.41.1" + "source": "https://github.com/platformsh/platformsh-client-php/tree/0.42.0" }, - "time": "2021-02-05T20:42:39+00:00" + "time": "2021-02-26T21:49:53+00:00" }, { "name": "platformsh/console-form", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.65.2/config.yaml new/platformsh-cli-3.65.4/config.yaml --- old/platformsh-cli-3.65.2/config.yaml 2021-02-16 21:33:37.000000000 +0100 +++ new/platformsh-cli-3.65.4/config.yaml 2021-03-17 14:44:30.000000000 +0100 @@ -106,7 +106,6 @@ # Configuration relating to API calls. # This can be overridden in the user config file. api: - oauth2_client_id: 'platform-cli' projects_ttl: 600 environments_ttl: 120 users_ttl: 600 @@ -120,6 +119,9 @@ # Overridden by {application.env_prefix}API_URL env var. base_url: 'https://api.platform.sh/' + # Overridden by {application.env_prefix}OAUTH2_CLIENT_ID env var. + oauth2_client_id: 'platform-cli' + # Overridden by {application.env_prefix}OAUTH2_AUTH_URL env var. oauth2_auth_url: 'https://auth.api.platform.sh/oauth2/authorize' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.65.2/dist/installer.php new/platformsh-cli-3.65.4/dist/installer.php --- old/platformsh-cli-3.65.2/dist/installer.php 2021-02-16 21:33:37.000000000 +0100 +++ new/platformsh-cli-3.65.4/dist/installer.php 2021-03-17 14:44:30.000000000 +0100 @@ -221,9 +221,14 @@ $url = str_replace($removePath, '/' . ltrim($url, '/'), $this->manifestUrl); } - if (!file_put_contents($this->pharName, file_get_contents($url, false, $this->getStreamContext(300)))) { + $opts = $this->getStreamContextOpts(300); + $contents = \file_get_contents($this->getAuthenticatedRedirect($url), false, \stream_context_create($opts)); + if ($contents === false) { return TaskResult::failure('The download failed'); } + if (!file_put_contents($this->pharName, $contents)) { + return TaskResult::failure('Failed to write to file: ' . $this->pharName); + } return TaskResult::success(); }); @@ -352,7 +357,7 @@ * @return TaskResult */ private function findLatestVersion($manifestUrl) { - $manifest = file_get_contents($manifestUrl, false, $this->getStreamContext(15)); + $manifest = file_get_contents($manifestUrl, false, \stream_context_create($this->getStreamContextOpts(15))); if ($manifest === false) { return TaskResult::failure('Failed to download manifest file: ' . $manifestUrl); } @@ -574,13 +579,13 @@ } /** - * Constructs a stream context for downloading files. + * Constructs stream context options for downloading files. * * @param int $timeout * - * @return resource + * @return array */ - private function getStreamContext($timeout) { + private function getStreamContextOpts($timeout) { $opts = [ 'http' => [ 'method' => 'GET', @@ -597,7 +602,84 @@ $opts['ssl']['verify_peer_name'] = false; } - return stream_context_create($opts); + return $opts; + } + + /** + * If possible, this converts a URL to an authenticated redirect. + * + * This only affects GitHub for now. + * + * @param string $url + * + * @return string + * An authenticated redirection URL, if possible. Otherwise the original URL is returned. + */ + private function getAuthenticatedRedirect($url) { + if (\strpos($url, '//github.com') === false) { + return $url; + } + $headers = $this->authHeaders($url); + if (!$headers) { + return $url; + } + $opts = $this->getStreamContextOpts(300); + $opts['http']['header'] = implode("\r\n", $headers); + $opts['http']['follow_location'] = 0; + $opts['http']['ignore_errors'] = true; + \file_get_contents($url, false, \stream_context_create($opts)); + // Check for a 301 or 302 response. + $headers = isset($http_response_header) ? $http_response_header : []; + if (isset($headers[0]) && \strpos($headers[0], ' 30') !== false) { + foreach ($headers as $header) { + // Read the Location header. + if (\stripos($header, 'Location: ') === 0) { + return \trim(\substr($header, 10)); + } + } + } + return $url; + } + + /** + * Generates authentication headers based on the request URL. + * + * At the moment this just supports github.com. + * + * @param string $url + * + * @return string[] + */ + private function authHeaders($url) { + $host = \parse_url($url, PHP_URL_HOST); + + if ($host === 'github.com') { + // Use the GITHUB_TOKEN in the environment, if available. + if ($token = \getenv('GITHUB_TOKEN')) { + return ['Authorization: token ' . $token]; + } + + // Use COMPOSER_AUTH and decode it. + // See https://getcomposer.org/doc/06-config.md#github-oauth + if (($composer_auth = \getenv('COMPOSER_AUTH')) + && ($json = \json_decode($composer_auth, true)) !== null + && !empty($json['github-oauth'][$host])) { + return ['Authorization: token ' . $json['github-oauth'][$host]]; + } + + // Read the local GitHub token from the project container. + // The token allows for higher rate limits but is otherwise unprivileged. + if (\getenv('HOME') !== false) { + $authFilename = \getenv('HOME') . '/.global/auth.json'; + if (\is_readable($authFilename) + && ($contents = \file_get_contents($authFilename)) !== false + && ($json = \json_decode($authFilename, true)) !== null + && !empty($json['github-oauth'][$host])) { + return ['Authorization: token ' . $json['github-oauth'][$host]]; + } + } + } + return []; } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.65.2/dist/manifest.json new/platformsh-cli-3.65.4/dist/manifest.json --- old/platformsh-cli-3.65.2/dist/manifest.json 2021-02-16 21:33:37.000000000 +0100 +++ new/platformsh-cli-3.65.4/dist/manifest.json 2021-03-17 14:44:30.000000000 +0100 @@ -17,10 +17,10 @@ }, { "name": "platform.phar", - "sha1": "3a879d60df584e9ea66551ca3148d1443758efd5", - "sha256": "88b1bf5ec1242b9d88c179281e599f48798f759342cbb1ac4b9cba25cf3a0fd1", - "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.65.2/platform.phar", - "version": "3.65.2", + "sha1": "b651add00ccb2125209413ef7d7f8881a0ad53ff", + "sha256": "1676a299a726f38f01e277398de8270aa8a060628a9ec8a52e7d4e9cd691aa8c", + "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.65.4/platform.phar", + "version": "3.65.4", "php": { "min": "5.5.9" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.65.2/src/Command/CommandBase.php new/platformsh-cli-3.65.4/src/Command/CommandBase.php --- old/platformsh-cli-3.65.2/src/Command/CommandBase.php 2021-02-16 21:33:37.000000000 +0100 +++ new/platformsh-cli-3.65.4/src/Command/CommandBase.php 2021-03-17 14:44:30.000000000 +0100 @@ -975,7 +975,7 @@ try { $worker = $deployment->getWorker($qualifiedWorkerName); } catch (\InvalidArgumentException $e) { - throw new ConsoleInvalidArgumentException('Worker not found: ' . $workerOption); + throw new ConsoleInvalidArgumentException('Worker not found: ' . $workerOption . ' (in app: ' . $appOption . ')'); } return $this->remoteContainer = new RemoteContainer\Worker($worker, $environment); @@ -1639,7 +1639,7 @@ * * @return HostInterface */ - public function selectHost(InputInterface $input, $allowLocal = true, RemoteContainer\RemoteContainerInterface $remoteContainer = null, $includeWorkers = false) + public function selectHost(InputInterface $input, $allowLocal = true, RemoteContainer\RemoteContainerInterface $remoteContainer = null, $includeWorkers = true) { /** @var Shell $shell */ $shell = $this->getService('shell'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.65.2/src/Command/User/UserAddCommand.php new/platformsh-cli-3.65.4/src/Command/User/UserAddCommand.php --- old/platformsh-cli-3.65.2/src/Command/User/UserAddCommand.php 2021-02-16 21:33:37.000000000 +0100 +++ new/platformsh-cli-3.65.4/src/Command/User/UserAddCommand.php 2021-03-17 14:44:30.000000000 +0100 @@ -506,6 +506,9 @@ $environments = $this->api()->getEnvironments($this->getSelectedProject()); $progress->start(count($environments)); foreach ($environments as $environment) { + if (!$environment->operationAvailable('manage-access')) { + continue; + } if ($access = $environment->getUser($projectAccess->id)) { $environmentRoles[$environment->id] = $access->role; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.65.2/src/Service/Api.php new/platformsh-cli-3.65.4/src/Service/Api.php --- old/platformsh-cli-3.65.2/src/Service/Api.php 2021-02-16 21:33:37.000000000 +0100 +++ new/platformsh-cli-3.65.4/src/Service/Api.php 2021-03-17 14:44:30.000000000 +0100 @@ -273,9 +273,9 @@ $connectorOptions['api_token_type'] = 'access'; } - $proxy = $this->getProxy(); - if ($proxy !== null) { - $connectorOptions['proxy'] = $proxy; + $guzzleOptions = $this->getGuzzleOptions(); + if (!empty($guzzleOptions['defaults']['proxy'])) { + $connectorOptions['proxy'] = $guzzleOptions['defaults']['proxy']; } // Override the OAuth 2.0 token and revoke URLs if provided. @@ -372,7 +372,14 @@ 'headers' => ['User-Agent' => $this->getUserAgent()], 'debug' => $this->config->get('api.debug') ? STDERR : false, 'verify' => !$this->config->get('api.skip_ssl'), - 'proxy' => $this->getProxy(), + 'proxy' => array_map(function($proxyUrl) { + // If Guzzle is going to use PHP's built-in HTTP streams, + // rather than curl, then transform the proxy scheme. + if (!\extension_loaded('curl') && \ini_get('allow_url_fopen')) { + return \str_replace(['http://', 'https://'], ['tcp://', 'tcp://'], $proxyUrl); + } + return $proxyUrl; + }, $this->getProxies()), 'timeout' => $this->config->get('api.default_timeout'), ], ]; @@ -464,25 +471,21 @@ } /** - * Finds a proxy address based on the http_proxy or https_proxy environment variables. + * Finds proxy addresses based on the http_proxy and https_proxy environment variables. * - * @return string|array|null + * @return array + * An ordered array of proxy URLs keyed by scheme: 'https' and/or 'http'. */ - private function getProxy() { - // The proxy variables should be ignored in a non-CLI context. - if (PHP_SAPI !== 'cli') { - return null; - } + private function getProxies() { $proxies = []; - foreach (['https', 'http'] as $scheme) { - $proxies[$scheme] = str_replace(['http://', 'https://'], ['tcp://', 'ssl://'], getenv($scheme . '_proxy')); + if (getenv('https_proxy') !== false) { + $proxies['https'] = getenv('https_proxy'); } - $proxies = array_filter($proxies); - if (count($proxies)) { - return count($proxies) === 1 ? reset($proxies) : $proxies; + // An environment variable prefixed by 'http_' cannot be trusted in a non-CLI (web) context. + if (PHP_SAPI === 'cli' && getenv('http_proxy') !== false) { + $proxies['http'] = getenv('http_proxy'); } - - return null; + return $proxies; } /** @@ -494,6 +497,7 @@ */ public function getStreamContext($timeout = 15) { $opts = [ + // See https://www.php.net/manual/en/context.http.php 'http' => [ 'method' => 'GET', 'follow_location' => 0, @@ -504,15 +508,12 @@ ], ], ]; - $proxy = $this->getProxy(); - if (is_array($proxy)) { - if (isset($proxy['https'])) { - $opts['http']['proxy'] = $proxy['https']; - } elseif (isset($proxy['http'])) { - $opts['http']['proxy'] = $proxy['http']; - } - } elseif (is_string($proxy) && $proxy !== '') { - $opts['http']['proxy'] = $proxy; + + // The PHP stream context only accepts a single proxy option, under the schemes 'tcp' or 'ssl'. + $proxies = $this->getProxies(); + foreach ($proxies as $scheme => $proxyUrl) { + $opts['http']['proxy'] = \str_replace(['http://', 'https://'], ['tcp://', 'ssl://'], $proxyUrl); + break; } return stream_context_create($opts); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.65.2/src/Service/Config.php new/platformsh-cli-3.65.4/src/Service/Config.php --- old/platformsh-cli-3.65.2/src/Service/Config.php 2021-02-16 21:33:37.000000000 +0100 +++ new/platformsh-cli-3.65.4/src/Service/Config.php 2021-03-17 14:44:30.000000000 +0100 @@ -319,6 +319,7 @@ 'ACCOUNTS_API' => 'api.accounts_api_url', 'API_URL' => 'api.base_url', 'OAUTH2_AUTH_URL' => 'api.oauth2_auth_url', + 'OAUTH2_CLIENT_ID' => 'api.oauth2_client_id', 'OAUTH2_TOKEN_URL' => 'api.oauth2_token_url', 'OAUTH2_REVOKE_URL' => 'api.oauth2_revoke_url', 'CERTIFIER_URL' => 'api.certifier_url', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.65.2/src/Service/Git.php new/platformsh-cli-3.65.4/src/Service/Git.php --- old/platformsh-cli-3.65.2/src/Service/Git.php 2021-02-16 21:33:37.000000000 +0100 +++ new/platformsh-cli-3.65.4/src/Service/Git.php 2021-03-17 14:44:30.000000000 +0100 @@ -558,10 +558,7 @@ */ private function setupSshEnv() { - if (!isset($this->ssh)) { - throw new \BadMethodCallException('SSH service not available'); - } - if (!isset($this->sshCommand)) { + if (isset($this->ssh) && !isset($this->sshCommand)) { $this->sshCommand = $this->ssh->getSshCommand($this->extraSshOptions); } if (empty($this->sshCommand) || $this->sshCommand === 'ssh') { ++++++ 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 2021-02-17 04:43:02.994305714 +0100 +++ new/vendor/autoload.php 2021-03-18 01:22:39.614163325 +0100 @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitb2c6d6ef2e3381227ebf575ed7bda3b8::getLoader(); +return ComposerAutoloaderInit411ad3dc1f6912bfbe3e42f2ebc6e05b::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 2021-02-17 04:43:02.994305714 +0100 +++ new/vendor/composer/autoload_real.php 2021-03-18 01:22:39.614163325 +0100 @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitb2c6d6ef2e3381227ebf575ed7bda3b8 +class ComposerAutoloaderInit411ad3dc1f6912bfbe3e42f2ebc6e05b { private static $loader; @@ -22,15 +22,15 @@ return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitb2c6d6ef2e3381227ebf575ed7bda3b8', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit411ad3dc1f6912bfbe3e42f2ebc6e05b', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitb2c6d6ef2e3381227ebf575ed7bda3b8', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit411ad3dc1f6912bfbe3e42f2ebc6e05b', '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\ComposerStaticInitb2c6d6ef2e3381227ebf575ed7bda3b8::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit411ad3dc1f6912bfbe3e42f2ebc6e05b::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -51,19 +51,19 @@ $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInitb2c6d6ef2e3381227ebf575ed7bda3b8::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit411ad3dc1f6912bfbe3e42f2ebc6e05b::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequireb2c6d6ef2e3381227ebf575ed7bda3b8($fileIdentifier, $file); + composerRequire411ad3dc1f6912bfbe3e42f2ebc6e05b($fileIdentifier, $file); } return $loader; } } -function composerRequireb2c6d6ef2e3381227ebf575ed7bda3b8($fileIdentifier, $file) +function composerRequire411ad3dc1f6912bfbe3e42f2ebc6e05b($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 2021-02-17 04:43:02.994305714 +0100 +++ new/vendor/composer/autoload_static.php 2021-03-18 01:22:39.614163325 +0100 @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitb2c6d6ef2e3381227ebf575ed7bda3b8 +class ComposerStaticInit411ad3dc1f6912bfbe3e42f2ebc6e05b { public static $files = array ( '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', @@ -193,9 +193,9 @@ public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitb2c6d6ef2e3381227ebf575ed7bda3b8::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitb2c6d6ef2e3381227ebf575ed7bda3b8::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitb2c6d6ef2e3381227ebf575ed7bda3b8::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit411ad3dc1f6912bfbe3e42f2ebc6e05b::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit411ad3dc1f6912bfbe3e42f2ebc6e05b::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit411ad3dc1f6912bfbe3e42f2ebc6e05b::$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 2021-02-17 04:43:02.570302221 +0100 +++ new/vendor/composer/installed.json 2021-03-18 01:22:39.114158645 +0100 @@ -747,17 +747,17 @@ }, { "name": "platformsh/client", - "version": "0.41.1", - "version_normalized": "0.41.1.0", + "version": "0.42.0", + "version_normalized": "0.42.0.0", "source": { "type": "git", "url": "https://github.com/platformsh/platformsh-client-php.git", - "reference": "5be54c7f64de23fe2ce7f2d391fed72edbf88af3" + "reference": "d87cc67684a56fa1c03e520669b03d25539d631c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/5be54c7f64de23fe2ce7f2d391fed72edbf88af3", - "reference": "5be54c7f64de23fe2ce7f2d391fed72edbf88af3", + "url": "https://api.github.com/repos/platformsh/platformsh-client-php/zipball/d87cc67684a56fa1c03e520669b03d25539d631c", + "reference": "d87cc67684a56fa1c03e520669b03d25539d631c", "shasum": "" }, "require": { @@ -771,7 +771,7 @@ "require-dev": { "phpunit/phpunit": "~4.5" }, - "time": "2021-02-05T20:42:39+00:00", + "time": "2021-02-26T21:49:53+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -791,7 +791,7 @@ "description": "Platform.sh API client", "support": { "issues": "https://github.com/platformsh/platformsh-client-php/issues", - "source": "https://github.com/platformsh/platformsh-client-php/tree/0.41.1" + "source": "https://github.com/platformsh/platformsh-client-php/tree/0.42.0" } }, { 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 2021-02-05 21:42:39.000000000 +0100 +++ new/vendor/platformsh/client/src/Model/Environment.php 2021-02-26 22:49:53.000000000 +0100 @@ -111,6 +111,14 @@ return $urls[$app]; } + // Look for the first URL whose key starts with "$app:". + \ksort($urls, SORT_NATURAL); + foreach ($urls as $key => $url) { + if (\strpos($key, $app . ':') === 0) { + return $url; + } + } + // Fall back to the legacy SSH URL. return $this->constructLegacySshUrl(); }