Hello community, here is the log from the commit of package platformsh-cli for openSUSE:Factory checked in at 2018-09-11 17:20:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/platformsh-cli (Old) and /work/SRC/openSUSE:Factory/.platformsh-cli.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "platformsh-cli" Tue Sep 11 17:20:14 2018 rev:54 rq:634825 version:3.34.3 Changes: -------- --- /work/SRC/openSUSE:Factory/platformsh-cli/platformsh-cli.changes 2018-09-07 15:41:50.938378930 +0200 +++ /work/SRC/openSUSE:Factory/.platformsh-cli.new/platformsh-cli.changes 2018-09-11 17:20:26.887120634 +0200 @@ -1,0 +2,14 @@ +Tue Sep 11 01:00:53 UTC 2018 - [email protected] + +- Update to version 3.34.3: + * Release v3.34.3 + * self:release: confirm changelog before building Phar + * Update Guzzle for PHP 7.3 compatibility + * Use pipenv instead of awscli in build deps test (for Travis) + * Test the installer via Travis + * Fix undefined constant STDOUT in the installer + * Fix undefined constant STDOUT in the installer + * Update list of default regions, take #2 (#742) + * Update list of default regions. (#741) + +------------------------------------------------------------------- Old: ---- platformsh-cli-3.34.2.tar.xz New: ---- platformsh-cli-3.34.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ platformsh-cli.spec ++++++ --- /var/tmp/diff_new_pack.JKd2wn/_old 2018-09-11 17:20:29.255117018 +0200 +++ /var/tmp/diff_new_pack.JKd2wn/_new 2018-09-11 17:20:29.259117012 +0200 @@ -17,7 +17,7 @@ Name: platformsh-cli -Version: 3.34.2 +Version: 3.34.3 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.JKd2wn/_old 2018-09-11 17:20:29.295116957 +0200 +++ /var/tmp/diff_new_pack.JKd2wn/_new 2018-09-11 17:20:29.299116950 +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.2</param> + <param name="revision">refs/tags/v3.34.3</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.JKd2wn/_old 2018-09-11 17:20:29.323116914 +0200 +++ /var/tmp/diff_new_pack.JKd2wn/_new 2018-09-11 17:20:29.323116914 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/platformsh/platformsh-cli.git</param> - <param name="changesrevision">c21b6c078fc8b805042b73307cd81f6228c1432f</param> + <param name="changesrevision">1ecb2ee81aa44b1f0fc7ef938d7a5018910784c4</param> </service> </servicedata> ++++++ licenses.txt ++++++ --- /var/tmp/diff_new_pack.JKd2wn/_old 2018-09-11 17:20:29.375116835 +0200 +++ /var/tmp/diff_new_pack.JKd2wn/_new 2018-09-11 17:20:29.379116828 +0200 @@ -11,8 +11,8 @@ doctrine/cache v1.6.2 MIT firebase/php-jwt v2.2.0 BSD-3-Clause guzzlehttp/cache-subscriber 0.1.0 MIT -guzzlehttp/guzzle 5.3.2 MIT -guzzlehttp/ringphp 1.1.0 MIT +guzzlehttp/guzzle 5.3.3 MIT +guzzlehttp/ringphp 1.1.1 MIT guzzlehttp/streams 3.0.0 MIT padraic/humbug_get_contents 1.1.2 BSD-3-Clause padraic/phar-updater v1.0.5 BSD-3-Clause ++++++ platformsh-cli-3.34.2.tar.xz -> platformsh-cli-3.34.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/.travis.yml new/platformsh-cli-3.34.3/.travis.yml --- old/platformsh-cli-3.34.2/.travis.yml 2018-09-06 12:10:02.000000000 +0200 +++ new/platformsh-cli-3.34.3/.travis.yml 2018-09-10 10:05:45.000000000 +0200 @@ -2,17 +2,37 @@ dist: trusty sudo: false -php: - - 5.5 - - 5.6 - - hhvm - - 7.0 - - 7.1 - - 7.2 +php: nightly +env: TEST_SCRIPT=scripts/test/unit.sh matrix: + include: + - php: 5.6 + env: TEST_SCRIPT=scripts/test/security.sh + - php: 7.2 + env: TEST_SCRIPT=scripts/test/security.sh + + - php: 5.6 + env: TEST_SCRIPT=scripts/test/installer.sh + + - php: 5.6 + env: TEST_SCRIPT=scripts/test/unit.sh + - php: 7.0 + env: TEST_SCRIPT=scripts/test/unit.sh + - php: 7.1 + env: TEST_SCRIPT=scripts/test/unit.sh + - php: 7.2 + env: TEST_SCRIPT=scripts/test/unit.sh + - php: nightly + env: TEST_SCRIPT=scripts/test/unit.sh + + - php: 7.2 + env: TEST_SCRIPT=scripts/test/slow.sh + allow_failures: - - php: hhvm + - php: nightly + - env: TEST_SCRIPT=scripts/test/slow.sh + fast_finish: true cache: @@ -23,6 +43,4 @@ install: - composer install --no-interaction -script: - - 'curl -H "Accept: text/plain" https://security.sensiolabs.org/check_lock -F lock=@./composer.lock' - - ./vendor/bin/phpunit -c ./phpunit.xml --coverage-text --exclude-group slow +script: "$TEST_SCRIPT" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/CONTRIBUTING.md new/platformsh-cli-3.34.3/CONTRIBUTING.md --- old/platformsh-cli-3.34.2/CONTRIBUTING.md 2018-09-06 12:10:02.000000000 +0200 +++ new/platformsh-cli-3.34.3/CONTRIBUTING.md 2018-09-10 10:05:45.000000000 +0200 @@ -21,7 +21,7 @@ Run tests with: ```sh -./vendor/bin/phpunit -c ./phpunit.xml +./scripts/test/unit.sh ``` Tests are also run on Travis CI: https://travis-ci.org/platformsh/platformsh-cli diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/composer.lock new/platformsh-cli-3.34.3/composer.lock --- old/platformsh-cli-3.34.2/composer.lock 2018-09-06 12:10:02.000000000 +0200 +++ new/platformsh-cli-3.34.3/composer.lock 2018-09-10 10:05:45.000000000 +0200 @@ -388,16 +388,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "5.3.2", + "version": "5.3.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "f9acb4761844317e626a32259205bec1f1bc60d2" + "reference": "93bbdb30d59be6cd9839495306c65f2907370eb9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f9acb4761844317e626a32259205bec1f1bc60d2", - "reference": "f9acb4761844317e626a32259205bec1f1bc60d2", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/93bbdb30d59be6cd9839495306c65f2907370eb9", + "reference": "93bbdb30d59be6cd9839495306c65f2907370eb9", "shasum": "" }, "require": { @@ -437,20 +437,20 @@ "rest", "web service" ], - "time": "2018-01-15T07:18:01+00:00" + "time": "2018-07-31T13:33:10+00:00" }, { "name": "guzzlehttp/ringphp", - "version": "1.1.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/guzzle/RingPHP.git", - "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b" + "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", - "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/5e2a174052995663dd68e6b5ad838afd47dd615b", + "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b", "shasum": "" }, "require": { @@ -488,7 +488,7 @@ } ], "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", - "time": "2015-05-20T03:37:09+00:00" + "time": "2018-07-31T13:22:33+00:00" }, { "name": "guzzlehttp/streams", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/config.yaml new/platformsh-cli-3.34.3/config.yaml --- old/platformsh-cli-3.34.2/config.yaml 2018-09-06 12:10:02.000000000 +0200 +++ new/platformsh-cli-3.34.3/config.yaml 2018-09-10 10:05:45.000000000 +0200 @@ -1,7 +1,7 @@ # Metadata about the CLI application itself. application: name: 'Platform.sh CLI' - version: '3.34.2' + version: '3.34.3' executable: 'platform' package_name: 'platformsh/cli' installer_url: 'https://platform.sh/cli/installer' @@ -65,10 +65,10 @@ default_from_address: '[email protected]' api_token_help_url: 'https://docs.platform.sh/gettingstarted/cli/api-tokens.html' available_regions: - - eu.platform.sh - - us.platform.sh + - eu-2.platform.sh + - us-2.platform.sh - au.platform.sh - - nl-1.platform.sh + - ca-1.platform.sh available_plans: - development - standard diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/dist/installer.php new/platformsh-cli-3.34.3/dist/installer.php --- old/platformsh-cli-3.34.2/dist/installer.php 2018-09-06 12:10:02.000000000 +0200 +++ new/platformsh-cli-3.34.3/dist/installer.php 2018-09-10 10:05:45.000000000 +0200 @@ -4,12 +4,15 @@ * Platform.sh CLI installer. */ -define('CLI_UPDATE_MANIFEST_URL', 'https://platform.sh/cli/manifest.json'); +define('CLI_UPDATE_MANIFEST_URL', getenv('PLATFORMSH_CLI_MANIFEST_URL') ?: 'https://platform.sh/cli/manifest.json'); define('CLI_CONFIG_DIR', '.platformsh'); define('CLI_EXECUTABLE', 'platform'); define('CLI_NAME', 'Platform.sh CLI'); define('CLI_PHAR', CLI_EXECUTABLE . '.phar'); +// Set up the CLI I/O. +setUpIo(); + set_error_handler( function ($code, $message) { if ($code & error_reporting()) { @@ -327,6 +330,30 @@ } /** + * Sets up the STDIN, STDOUT and STDERR constants. + * + * Due to a PHP bug, these constants are not available when the PHP script is + * being read from stdin. + * + * @see https://bugs.php.net/bug.php?id=43283 + */ +function setUpIo() +{ + if (PHP_SAPI !== 'cli') { + throw new RuntimeException('This can only be run via command-line PHP.'); + } + if (!defined('STDIN')) { + define('STDIN', fopen('php://stdin', 'r')); + } + if (!defined('STDOUT')) { + define('STDOUT', fopen('php://stdout', 'w')); + } + if (!defined('STDERR')) { + define('STDERR', fopen('php://stderr', 'w')); + } +} + +/** * Finds the user's home directory. * * @return string|false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/dist/manifest.json new/platformsh-cli-3.34.3/dist/manifest.json --- old/platformsh-cli-3.34.2/dist/manifest.json 2018-09-06 12:10:02.000000000 +0200 +++ new/platformsh-cli-3.34.3/dist/manifest.json 2018-09-10 10:05:45.000000000 +0200 @@ -1,10 +1,10 @@ [ { "name": "platform.phar", - "sha1": "c14d2c03696499304634abfea9e027286a152c05", - "sha256": "11b35014067a096b65f73ee506eb8d40f8baca9cb9dc23e73c3b7d0b512182bb", - "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.34.2/platform.phar", - "version": "3.34.2", + "sha1": "5f2d76a8d5a0168870a32fce55738cf5af4d0718", + "sha256": "561ed33bd3fc5869fc9f65419aeb600f2cee439624183865b2370a6e31c7bf00", + "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.34.3/platform.phar", + "version": "3.34.3", "php": { "min": "5.5.9" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/scripts/test/installer.sh new/platformsh-cli-3.34.3/scripts/test/installer.sh --- old/platformsh-cli-3.34.2/scripts/test/installer.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/platformsh-cli-3.34.3/scripts/test/installer.sh 2018-09-10 10:05:45.000000000 +0200 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Tests the CLI installer. +# This must be run from the repository root. + +PLATFORMSH_CLI_MANIFEST_URL=./dist/manifest.json cat ./dist/installer.php | php diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/scripts/test/security.sh new/platformsh-cli-3.34.3/scripts/test/security.sh --- old/platformsh-cli-3.34.2/scripts/test/security.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/platformsh-cli-3.34.3/scripts/test/security.sh 2018-09-10 10:05:45.000000000 +0200 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Tests the composer.lock file against the SensioLabs security checker. +# This must be run from the repository root. + +curl -H 'Accept: text/plain' https://security.sensiolabs.org/check_lock -F lock=@./composer.lock diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/scripts/test/slow.sh new/platformsh-cli-3.34.3/scripts/test/slow.sh --- old/platformsh-cli-3.34.2/scripts/test/slow.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/platformsh-cli-3.34.3/scripts/test/slow.sh 2018-09-10 10:05:45.000000000 +0200 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Runs slow PhpUnit tests. +# This must be run from the repository root. + +./vendor/bin/phpunit -c ./phpunit.xml --group slow diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/scripts/test/unit.sh new/platformsh-cli-3.34.3/scripts/test/unit.sh --- old/platformsh-cli-3.34.2/scripts/test/unit.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/platformsh-cli-3.34.3/scripts/test/unit.sh 2018-09-10 10:05:45.000000000 +0200 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Runs PhpUnit tests. +# This must be run from the repository root. + +./vendor/bin/phpunit -c ./phpunit.xml --coverage-text --exclude-group slow diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/src/Command/Self/SelfReleaseCommand.php new/platformsh-cli-3.34.3/src/Command/Self/SelfReleaseCommand.php --- old/platformsh-cli-3.34.2/src/Command/Self/SelfReleaseCommand.php 2018-09-06 12:10:02.000000000 +0200 +++ new/platformsh-cli-3.34.3/src/Command/Self/SelfReleaseCommand.php 2018-09-10 10:05:45.000000000 +0200 @@ -99,6 +99,15 @@ return 1; } + // Validate the --phar option. + $pharFilename = $input->getOption('phar'); + if ($pharFilename && !file_exists($pharFilename)) { + $this->stdErr->writeln('File not found: <error>' . $pharFilename . '</error>'); + + return 1; + } + + // Set up GitHub API connection details. $tagName = 'v' . $newVersion; $http = new Client(); $repo = $input->getOption('repo') ?: $this->config()->get('application.github_repo'); @@ -106,6 +115,7 @@ $repoApiUrl = 'https://api.github.com/repos/' . $repoUrl; $repoGitUrl = '[email protected]:' . $repo . '.git'; + // Check if the chosen version number already exists as a release. $existsResponse = $http->get($repoApiUrl . '/releases/tags/' . $tagName, [ 'headers' => [ 'Authorization' => 'token ' . $gitHubToken, @@ -126,37 +136,7 @@ return 1; } - $pharFilename = $input->getOption('phar'); - if ($pharFilename && !file_exists($pharFilename)) { - $this->stdErr->writeln('File not found: <error>' . $pharFilename . '</error>'); - - return 1; - } - if (!$pharFilename) { - $pharFilename = sys_get_temp_dir() . '/' . $this->config()->get('application.executable') . '.phar'; - $result = $this->runOtherCommand('self:build', [ - '--output' => $pharFilename, - '--yes' => true, - ]); - if ($result !== 0) { - $this->stdErr->writeln('The build failed'); - - return $result; - } - } else { - $versionInPhar = $shell->execute([ - (new PhpExecutableFinder())->find() ?: PHP_BINARY, - $pharFilename, - '--version' - ], null, true); - if (strpos($versionInPhar, $newVersion) === false) { - $this->stdErr->writeln('The file ' . $pharFilename . ' reports a different version: "' . $versionInPhar . '"'); - - return 1; - } - } - - // Write to the manifest file. + // Check the manifest file for the right item to update. $manifestFile = $input->getOption('manifest') ?: CLI_ROOT . '/dist/manifest.json'; $contents = file_get_contents($manifestFile); if ($contents === false) { @@ -165,7 +145,7 @@ if (!is_writable($manifestFile)) { throw new \RuntimeException('Manifest file not writable: ' . $manifestFile); } - $this->stdErr->writeln('Updating manifest file: ' . $manifestFile); + $this->stdErr->writeln('Checking manifest file: ' . $manifestFile); $manifest = json_decode($contents, true); if ($manifest === null && json_last_error()) { throw new \RuntimeException('Failed to decode manifest file: ' . $manifestFile); @@ -176,7 +156,6 @@ $latestItem = &$manifest[$key]; } } - switch ($input->getOption('manifest-mode')) { case 'update-latest': $manifestItem = &$latestItem; @@ -191,6 +170,7 @@ throw new \RuntimeException('Unrecognised --manifest-mode: ' . $input->getOption('manifest-mode')); } + // Fetch the previous version details from the GitHub API. if ($input->getOption('last-version')) { $lastVersion = ltrim($input->getOption('last-version'), 'v'); $lastTag = 'v' . $lastVersion; @@ -208,6 +188,7 @@ $this->stdErr->writeln(' Found latest version: v' . $lastVersion); } + // Validate the new version number against the previous version. if (version_compare($newVersion, $lastVersion, '<') && !$input->getOption('allow-lower')) { $this->stdErr->writeln(sprintf('The new version number <error>%s</error> is lower than the last version number <error>%s</error>.', $newVersion, $lastVersion)); $this->stdErr->writeln('Use --allow-lower to skip this check.'); @@ -215,8 +196,7 @@ return 1; } - $pharPublicFilename = $this->config()->get('application.executable') . '.phar'; - + // Confirm the release changelog. $changelog = $this->getReleaseChangelog($lastVersion, $repoApiUrl); $questionText = "\nChangelog:\n\n" . $changelog . "\n\nIs this changelog correct?"; /** @var \Platformsh\Cli\Service\QuestionHelper $questionHelper */ @@ -227,12 +207,42 @@ return 1; } + // Build a Phar file, if one doesn't already exist. + if (!$pharFilename) { + $pharFilename = sys_get_temp_dir() . '/' . $this->config()->get('application.executable') . '.phar'; + $result = $this->runOtherCommand('self:build', [ + '--output' => $pharFilename, + '--yes' => true, + ]); + if ($result !== 0) { + $this->stdErr->writeln('The build failed'); + + return $result; + } + } + + // Validate that the Phar file has the right version number. + if ($pharFilename) { + $versionInPhar = $shell->execute([ + (new PhpExecutableFinder())->find() ?: PHP_BINARY, + $pharFilename, + '--version' + ], null, true); + if (strpos($versionInPhar, $newVersion) === false) { + $this->stdErr->writeln('The file ' . $pharFilename . ' reports a different version: "' . $versionInPhar . '"'); + + return 1; + } + } + // Construct the download URL (the public location of the Phar file). + $pharPublicFilename = $this->config()->get('application.executable') . '.phar'; $download_url = str_replace('{tag}', $tagName, $this->config()->getWithDefault( 'application.download_url', 'https://github.com/' . $repoUrl . '/releases/download/{tag}/' . $pharPublicFilename )); + // Construct the new manifest item details. $manifestItem['version'] = $newVersion; $manifestItem['sha1'] = sha1_file($pharFilename); $manifestItem['sha256'] = hash_file('sha256', $pharFilename); @@ -259,6 +269,7 @@ return 1; } + // Commit any changes to Git. $gitStatus = $git->execute(['status', '--porcelain'], CLI_ROOT, true); if (is_string($gitStatus) && !empty($gitStatus)) { $this->stdErr->writeln('Committing changes to Git'); @@ -269,15 +280,18 @@ } } + // Tag the current commit. $this->stdErr->writeln('Creating tag <info>' . $tagName . '</info>'); $git->execute(['tag', '--force', $tagName], CLI_ROOT, true); + // Push to GitHub. if (!$questionHelper->confirm('Push changes and tag to <comment>' . $releaseBranch . '</comment> branch on ' . $repoGitUrl . '?')) { return 1; } $shell->execute(['git', 'push', $repoGitUrl, 'HEAD:' . $releaseBranch], CLI_ROOT, true); $shell->execute(['git', 'push', '--force', $repoGitUrl, $tagName], CLI_ROOT, true); + // Upload a release to GitHub. $lastReleasePublicUrl = 'https://github.com/' . $repoUrl . '/releases/' . $lastTag; $releaseDescription = sprintf('Changes since [%s](%s):', $lastTag, $lastReleasePublicUrl); if (!empty($changelog)) { @@ -285,20 +299,16 @@ } else { $releaseDescription .= "\n\n" . 'https://github.com/' . $repoUrl . '/compare/' . $lastTag . '...' . $tagName; } - $releaseDescription .= "\n\n" . sprintf('SHA-256 checksum for `%s`:', $pharPublicFilename) . "\n" . sprintf('`%s`', hash_file('sha256', $pharFilename)); - $this->stdErr->writeln(''); $this->stdErr->writeln('Creating new release ' . $tagName . ' on GitHub'); $this->stdErr->writeln('Release description:'); $this->stdErr->writeln(preg_replace('/^/m', ' ', $releaseDescription)); $this->stdErr->writeln(''); - if (!$questionHelper->confirm('Is this OK?')) { return 1; } - $http = new Client(); $response = $http->post($repoApiUrl . '/releases', [ 'headers' => [ @@ -318,6 +328,7 @@ $releaseUrl = $repoApiUrl . '/releases/' . $release['id']; $uploadUrl = preg_replace('/\{.+?\}/', '', $release['upload_url']); + // Upload the Phar to the GitHub release. $this->stdErr->writeln('Uploading the Phar file to the release'); $fileResource = fopen($pharFilename, 'r'); if (!$fileResource) { @@ -333,6 +344,7 @@ 'debug' => $output->isDebug(), ]); + // Mark the GitHub release as published. $this->stdErr->writeln('Publishing the release'); $http->patch($releaseUrl, [ 'headers' => [ @@ -343,7 +355,6 @@ 'json' => ['draft' => false], 'debug' => $output->isDebug(), ]); - $this->stdErr->writeln(''); $this->stdErr->writeln('Release successfully published'); $this->stdErr->writeln('https://github.com/' . $repoUrl . '/releases/latest'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.34.2/tests/data/apps/build-deps/.platform.app.yaml new/platformsh-cli-3.34.3/tests/data/apps/build-deps/.platform.app.yaml --- old/platformsh-cli-3.34.2/tests/data/apps/build-deps/.platform.app.yaml 2018-09-06 12:10:02.000000000 +0200 +++ new/platformsh-cli-3.34.3/tests/data/apps/build-deps/.platform.app.yaml 2018-09-10 10:05:45.000000000 +0200 @@ -6,22 +6,20 @@ nodejs: less: '*' python: - awscli: '*' + pipenv: '*' php: platformsh/cli: '*' ruby: compass: '*' hooks: # Test that the four CLI tools installed above are present and run correctly. - # The AWS CLI needs an environment variable (PYTHONPATH) to be set in - # \Platformsh\Cli\Local\DependencyInstaller::putEnv(). build: | set -xe command -v lessc - command -v aws + command -v pipenv command -v platform command -v compass lessc --version - aws --version + pipenv --version platform --version compass version ++++++ 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-09-06 14:45:07.070740165 +0200 +++ new/vendor/autoload.php 2018-09-11 03:01:09.736825981 +0200 @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInita727df1fa9354e27c13787d0f95cb5f6::getLoader(); +return ComposerAutoloaderInit4673f61280c290aeddcb7f94fa31a1eb::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-09-06 14:45:07.070740165 +0200 +++ new/vendor/composer/autoload_real.php 2018-09-11 03:01:09.736825981 +0200 @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInita727df1fa9354e27c13787d0f95cb5f6 +class ComposerAutoloaderInit4673f61280c290aeddcb7f94fa31a1eb { private static $loader; @@ -19,15 +19,15 @@ return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInita727df1fa9354e27c13787d0f95cb5f6', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit4673f61280c290aeddcb7f94fa31a1eb', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInita727df1fa9354e27c13787d0f95cb5f6', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit4673f61280c290aeddcb7f94fa31a1eb', '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\ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit4673f61280c290aeddcb7f94fa31a1eb::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\ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit4673f61280c290aeddcb7f94fa31a1eb::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequirea727df1fa9354e27c13787d0f95cb5f6($fileIdentifier, $file); + composerRequire4673f61280c290aeddcb7f94fa31a1eb($fileIdentifier, $file); } return $loader; } } -function composerRequirea727df1fa9354e27c13787d0f95cb5f6($fileIdentifier, $file) +function composerRequire4673f61280c290aeddcb7f94fa31a1eb($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-09-06 14:45:07.070740165 +0200 +++ new/vendor/composer/autoload_static.php 2018-09-11 03:01:09.736825981 +0200 @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6 +class ComposerStaticInit4673f61280c290aeddcb7f94fa31a1eb { 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 = ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInita727df1fa9354e27c13787d0f95cb5f6::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit4673f61280c290aeddcb7f94fa31a1eb::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit4673f61280c290aeddcb7f94fa31a1eb::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit4673f61280c290aeddcb7f94fa31a1eb::$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-09-06 14:45:06.090730993 +0200 +++ new/vendor/composer/installed.json 2018-09-11 03:01:08.296812396 +0200 @@ -395,17 +395,17 @@ }, { "name": "guzzlehttp/guzzle", - "version": "5.3.2", - "version_normalized": "5.3.2.0", + "version": "5.3.3", + "version_normalized": "5.3.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "f9acb4761844317e626a32259205bec1f1bc60d2" + "reference": "93bbdb30d59be6cd9839495306c65f2907370eb9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f9acb4761844317e626a32259205bec1f1bc60d2", - "reference": "f9acb4761844317e626a32259205bec1f1bc60d2", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/93bbdb30d59be6cd9839495306c65f2907370eb9", + "reference": "93bbdb30d59be6cd9839495306c65f2907370eb9", "shasum": "" }, "require": { @@ -417,7 +417,7 @@ "ext-curl": "*", "phpunit/phpunit": "^4.0" }, - "time": "2018-01-15T07:18:01+00:00", + "time": "2018-07-31T13:33:10+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -450,17 +450,17 @@ }, { "name": "guzzlehttp/ringphp", - "version": "1.1.0", - "version_normalized": "1.1.0.0", + "version": "1.1.1", + "version_normalized": "1.1.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/RingPHP.git", - "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b" + "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", - "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/5e2a174052995663dd68e6b5ad838afd47dd615b", + "reference": "5e2a174052995663dd68e6b5ad838afd47dd615b", "shasum": "" }, "require": { @@ -475,7 +475,7 @@ "suggest": { "ext-curl": "Guzzle will use specific adapters if cURL is present" }, - "time": "2015-05-20T03:37:09+00:00", + "time": "2018-07-31T13:22:33+00:00", "type": "library", "extra": { "branch-alias": { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/guzzle/.travis.yml new/vendor/guzzlehttp/guzzle/.travis.yml --- old/vendor/guzzlehttp/guzzle/.travis.yml 2018-01-15 08:18:01.000000000 +0100 +++ new/vendor/guzzlehttp/guzzle/.travis.yml 2018-07-31 15:33:10.000000000 +0200 @@ -5,7 +5,10 @@ - 5.5 - 5.6 - 7.0 + - 7.1 + - 7.2 - hhvm + - nightly env: global: @@ -26,6 +29,7 @@ matrix: allow_failures: - php: hhvm + - php: nightly fast_finish: true include: - php: 5.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/guzzle/CHANGELOG.md new/vendor/guzzlehttp/guzzle/CHANGELOG.md --- old/vendor/guzzlehttp/guzzle/CHANGELOG.md 2018-01-15 08:18:01.000000000 +0100 +++ new/vendor/guzzlehttp/guzzle/CHANGELOG.md 2018-07-31 15:33:10.000000000 +0200 @@ -1,5 +1,10 @@ # CHANGELOG +## 5.3.3 - 2018-07-31 + +* Fix bug parsing 0 epoch expiry times +* Fix PHP 7.3 compatibility + ## 5.3.2 - 2018-01-15 * Improve tests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php new/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php --- old/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php 2018-01-15 08:18:01.000000000 +0100 +++ new/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php 2018-07-31 15:33:10.000000000 +0200 @@ -333,7 +333,7 @@ */ public function isExpired() { - return $this->getExpires() && time() > $this->getExpires(); + return $this->getExpires() !== null && time() > $this->getExpires(); } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php new/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php --- old/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php 2018-01-15 08:18:01.000000000 +0100 +++ new/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php 2018-07-31 15:33:10.000000000 +0200 @@ -194,7 +194,7 @@ case 'allow_redirects': if ($value === false) { - continue; + continue 2; } if ($value === true) { @@ -213,7 +213,7 @@ case 'decode_content': if ($value === false) { - continue; + continue 2; } $config['decode_content'] = true; @@ -251,7 +251,7 @@ case 'auth': if (!$value) { - continue; + continue 2; } if (is_array($value)) { @@ -354,7 +354,7 @@ if (isset($this->customOptions[$key])) { $fn = $this->customOptions[$key]; $fn($request, $value); - continue; + continue 2; } throw new Iae("No method can handle the {$key} config key"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/ringphp/.editorconfig new/vendor/guzzlehttp/ringphp/.editorconfig --- old/vendor/guzzlehttp/ringphp/.editorconfig 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/guzzlehttp/ringphp/.editorconfig 2018-07-31 15:22:33.000000000 +0200 @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{Makefile,*.mk}] +indent_style = tab diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/ringphp/.travis.yml new/vendor/guzzlehttp/ringphp/.travis.yml --- old/vendor/guzzlehttp/ringphp/.travis.yml 2015-05-20 05:37:09.000000000 +0200 +++ new/vendor/guzzlehttp/ringphp/.travis.yml 2018-07-31 15:22:33.000000000 +0200 @@ -1,22 +1,43 @@ language: php +cache: + directories: + - $HOME/.composer/cache/files + php: - 5.4 - 5.5 - 5.6 - 7.0 + - 7.1 + - 7.2 - hhvm + - nightly -before_script: - - composer self-update - - composer install --no-interaction --prefer-source --dev - - ~/.nvm/nvm.sh install v0.6.14 - - ~/.nvm/nvm.sh run v0.6.14 - -script: - - make test +env: + global: + - TEST_COMMAND="composer test" matrix: allow_failures: - php: hhvm + - php: nightly fast_finish: true + include: + - php: 5.4 + env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" + +before_install: + - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi + +install: + # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 + - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi + - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction + +before_script: + - ~/.nvm/nvm.sh install v0.6.14 + - ~/.nvm/nvm.sh run v0.6.14 + +script: + - $TEST_COMMAND diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/ringphp/CHANGELOG.md new/vendor/guzzlehttp/ringphp/CHANGELOG.md --- old/vendor/guzzlehttp/ringphp/CHANGELOG.md 2015-05-20 05:37:09.000000000 +0200 +++ new/vendor/guzzlehttp/ringphp/CHANGELOG.md 2018-07-31 15:22:33.000000000 +0200 @@ -1,54 +1,118 @@ -# CHANGELOG +# Changelog -## 1.1.0 - 2015-05-19 -* Added `CURL_HTTP_VERSION_2_0` -* The PHP stream wrapper handler now sets `allow_self_signed` to `false` to +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + + +## [Unreleased] + + +## [1.1.1] - 2018-07-31 + +### Fixed + +- `continue` keyword usage on PHP 7.3 + + +## [1.1.0] - 2015-05-19 + +### Added + +- Added `CURL_HTTP_VERSION_2_0` + +### Changed + +- The PHP stream wrapper handler now sets `allow_self_signed` to `false` to match the cURL handler when `verify` is set to `true` or a certificate file. -* Ensuring that a directory exists before using the `save_to` option. -* Response protocol version is now correctly extracted from a response. -* Fixed a bug in which the result of `CurlFactory::retryFailedRewind` did not +- Ensuring that a directory exists before using the `save_to` option. +- Response protocol version is now correctly extracted from a response. + +### Fixed + +- Fixed a bug in which the result of `CurlFactory::retryFailedRewind` did not return an array. -## 1.0.7 - 2015-03-29 -* PHP 7 fixes. +## [1.0.7] - 2015-03-29 + +### Fixed + +- PHP 7 fixes. + -## 1.0.6 - 2015-02-26 +## [1.0.6] - 2015-02-26 -* Bug fix: futures now extend from React's PromiseInterface to ensure that they +### Changed + +- The multi handle of the CurlMultiHandler is now created lazily. + +### Fixed + +- Bug fix: futures now extend from React's PromiseInterface to ensure that they are properly forwarded down the promise chain. -* The multi handle of the CurlMultiHandler is now created lazily. -## 1.0.5 - 2014-12-10 -* Adding more error information to PHP stream wrapper exceptions. -* Added digest auth integration test support to test server. +## [1.0.5] - 2014-12-10 + +### Added + +- Adding more error information to PHP stream wrapper exceptions. +- Added digest auth integration test support to test server. + + +## [1.0.4] - 2014-12-01 + +### Added + +- Added support for older versions of cURL that do not have CURLOPT_TIMEOUT_MS. +- Added a fix to the StreamHandler to return a `FutureArrayInterface` when an -## 1.0.4 - 2014-12-01 +### Changed -* Added support for older versions of cURL that do not have CURLOPT_TIMEOUT_MS. -* Setting debug to `false` does not enable debug output. -* Added a fix to the StreamHandler to return a `FutureArrayInterface` when an - error occurs. +- Setting debug to `false` does not enable debug output. error occurs. -## 1.0.3 - 2014-11-03 -* Setting the `header` stream option as a string to be compatible with GAE. -* Header parsing now ensures that header order is maintained in the parsed +## [1.0.3] - 2014-11-03 + +### Fixed + +- Setting the `header` stream option as a string to be compatible with GAE. +- Header parsing now ensures that header order is maintained in the parsed message. -## 1.0.2 - 2014-10-28 -* Now correctly honoring a `version` option is supplied in a request. +## [1.0.2] - 2014-10-28 + +### Fixed + +- Now correctly honoring a `version` option is supplied in a request. See https://github.com/guzzle/RingPHP/pull/8 -## 1.0.1 - 2014-10-26 -* Fixed a header parsing issue with the `CurlHandler` and `CurlMultiHandler` +## [1.0.1] - 2014-10-26 + +### Fixed + +- Fixed a header parsing issue with the `CurlHandler` and `CurlMultiHandler` that caused cURL requests with multiple responses to merge repsonses together (e.g., requests with digest authentication). + ## 1.0.0 - 2014-10-12 -* Initial release. +- Initial release + + +[Unreleased]: https://github.com/guzzle/RingPHP/compare/1.1.1...HEAD +[1.1.1]: https://github.com/guzzle/RingPHP/compare/1.1.0...1.1.1 +[1.1.0]: https://github.com/guzzle/RingPHP/compare/1.0.7...1.1.0 +[1.0.7]: https://github.com/guzzle/RingPHP/compare/1.0.6...1.0.7 +[1.0.6]: https://github.com/guzzle/RingPHP/compare/1.0.5...1.0.6 +[1.0.5]: https://github.com/guzzle/RingPHP/compare/1.0.4...1.0.5 +[1.0.4]: https://github.com/guzzle/RingPHP/compare/1.0.3...1.0.4 +[1.0.3]: https://github.com/guzzle/RingPHP/compare/1.0.2...1.0.3 +[1.0.2]: https://github.com/guzzle/RingPHP/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/guzzle/RingPHP/compare/1.0.0...1.0.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/ringphp/composer.json new/vendor/guzzlehttp/ringphp/composer.json --- old/vendor/guzzlehttp/ringphp/composer.json 2015-05-20 05:37:09.000000000 +0200 +++ new/vendor/guzzlehttp/ringphp/composer.json 2018-07-31 15:22:33.000000000 +0200 @@ -31,6 +31,10 @@ "GuzzleHttp\\Tests\\Ring\\": "tests/" } }, + "scripts": { + "test": "make test", + "test-ci": "make coverage" + }, "extra": { "branch-alias": { "dev-master": "1.1-dev" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/ringphp/src/Client/ClientUtils.php new/vendor/guzzlehttp/ringphp/src/Client/ClientUtils.php --- old/vendor/guzzlehttp/ringphp/src/Client/ClientUtils.php 2015-05-20 05:37:09.000000000 +0200 +++ new/vendor/guzzlehttp/ringphp/src/Client/ClientUtils.php 2018-07-31 15:22:33.000000000 +0200 @@ -63,7 +63,7 @@ PHP versions earlier than 5.6 are not properly configured to use the system's CA bundle by default. In order to verify peer certificates, you will need to supply the path on disk to a certificate bundle to the 'verify' request -option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not +option: http://docs.guzzlephp.org/en/5.3/clients.html#verify. If you do not need a specific certificate bundle, then Mozilla provides a commonly used CA bundle which can be downloaded here (provided by the maintainer of cURL): https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php new/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php --- old/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php 2015-05-20 05:37:09.000000000 +0200 +++ new/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php 2018-07-31 15:22:33.000000000 +0200 @@ -360,7 +360,7 @@ unset($options[CURLOPT_CAINFO]); $options[CURLOPT_SSL_VERIFYHOST] = 0; $options[CURLOPT_SSL_VERIFYPEER] = false; - continue; + continue 2; } $options[CURLOPT_SSL_VERIFYHOST] = 2; @@ -379,7 +379,7 @@ case 'decode_content': if ($value === false) { - continue; + continue 2; } $accept = Core::firstHeader($request, 'Accept-Encoding'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php new/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php --- old/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php 2015-05-20 05:37:09.000000000 +0200 +++ new/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php 2018-07-31 15:22:33.000000000 +0200 @@ -230,9 +230,7 @@ if ($done['result'] !== CURLM_OK) { $entry['response']['curl']['errno'] = $done['result']; - if (function_exists('curl_strerror')) { - $entry['response']['curl']['error'] = curl_strerror($done['result']); - } + $entry['response']['curl']['error'] = curl_error($done['handle']); } $result = CurlFactory::createResponse( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/guzzlehttp/ringphp/tests/Client/CurlMultiHandlerTest.php new/vendor/guzzlehttp/ringphp/tests/Client/CurlMultiHandlerTest.php --- old/vendor/guzzlehttp/ringphp/tests/Client/CurlMultiHandlerTest.php 2015-05-20 05:37:09.000000000 +0200 +++ new/vendor/guzzlehttp/ringphp/tests/Client/CurlMultiHandlerTest.php 2018-07-31 15:22:33.000000000 +0200 @@ -162,4 +162,20 @@ $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); $this->assertEquals(202, $response['status']); } + + public function testExtractsErrors() + { + $request = [ + 'http_method' => 'GET', + 'headers' => ['host' => ['127.0.0.1:123']], + 'future' => true, + ]; + Server::flush(); + Server::enqueue([['status' => 202]]); + $a = new CurlMultiHandler(); + $response = $a($request); + $this->assertInstanceOf('GuzzleHttp\Ring\Future\FutureArray', $response); + $this->assertEquals(CURLE_COULDNT_CONNECT, $response['curl']['errno']); + $this->assertNotEmpty($response['curl']['error']); + } }
