Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit platformsh-cli for openSUSE:Factory
Hello community,

here is the log from the commit of package platformsh-cli for openSUSE:Factory
checked in at 2019-04-17 10:10:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/platformsh-cli (Old)
and /work/SRC/openSUSE:Factory/.platformsh-cli.new.17052 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "platformsh-cli"

Wed Apr 17 10:10:21 2019 rev:68 rq:694835 version:3.40.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/platformsh-cli/platformsh-cli.changes
2019-04-08 10:36:29.231221810 +0200
+++ /work/SRC/openSUSE:Factory/.platformsh-cli.new.17052/platformsh-cli.changes
2019-04-17 10:10:31.794924420 +0200
@@ -1,0 +2,11 @@
+Tue Apr 16 13:59:21 UTC 2019 - jimmy@xxxxxxxxxxxxxxx
+
+- Update to version 3.40.12:
+ * Release v3.40.12
+ * New animation
+ * Improve access token refresh
+ * Offer to "Log in anyway?" in browser login
+ * Fix local project not found exception when specifying another project
+ * Ensure "vendor" is rebuilt by default in self:build
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ platformsh-cli.spec ++++++
--- /var/tmp/diff_new_pack.cC9j3I/_old 2019-04-17 10:10:33.146925861 +0200
+++ /var/tmp/diff_new_pack.cC9j3I/_new 2019-04-17 10:10:33.150925865 +0200
@@ -17,7 +17,7 @@


Name: platformsh-cli
-Version: 3.40.11
+Version: 3.40.12
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.cC9j3I/_old 2019-04-17 10:10:33.174925890 +0200
+++ /var/tmp/diff_new_pack.cC9j3I/_new 2019-04-17 10:10:33.174925890 +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.40.11</param>
+ <param name="revision">refs/tags/v3.40.12</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.cC9j3I/_old 2019-04-17 10:10:33.198925916 +0200
+++ /var/tmp/diff_new_pack.cC9j3I/_new 2019-04-17 10:10:33.198925916 +0200
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/platformsh/platformsh-cli.git</param>
- <param
name="changesrevision">c98278b4b6e86d82c34b77baae48423407867fe7</param>
+ <param
name="changesrevision">d54f9ffd8c0e09420ff0c35fc3841b975abaa2fb</param>
</service>
</servicedata>

++++++ licenses.txt ++++++
--- /var/tmp/diff_new_pack.cC9j3I/_old 2019-04-17 10:10:33.234925954 +0200
+++ /var/tmp/diff_new_pack.cC9j3I/_new 2019-04-17 10:10:33.234925954 +0200
@@ -17,7 +17,7 @@
padraic/humbug_get_contents 1.1.2 BSD-3-Clause
padraic/phar-updater v1.0.6 BSD-3-Clause
paragonie/random_compat v2.0.18 MIT
-platformsh/client v0.23.2 MIT
+platformsh/client v0.23.5 MIT
platformsh/console-form v0.0.23 MIT
psr/container 1.0.0 MIT
psr/log 1.1.0 MIT

++++++ platformsh-cli-3.40.11.tar.xz -> platformsh-cli-3.40.12.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.40.11/composer.json
new/platformsh-cli-3.40.12/composer.json
--- old/platformsh-cli-3.40.11/composer.json 2019-04-04 15:23:21.000000000
+0200
+++ new/platformsh-cli-3.40.12/composer.json 2019-04-15 22:37:34.000000000
+0200
@@ -8,7 +8,7 @@
"guzzlehttp/guzzle": "^5.3",
"guzzlehttp/ringphp": "^1.1",
"platformsh/console-form": ">=0.0.22 <2.0",
- "platformsh/client": ">=0.23.2 <2.0",
+ "platformsh/client": ">=0.23.5 <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.40.11/composer.lock
new/platformsh-cli-3.40.12/composer.lock
--- old/platformsh-cli-3.40.11/composer.lock 2019-04-04 15:23:21.000000000
+0200
+++ new/platformsh-cli-3.40.12/composer.lock 2019-04-15 22:37:34.000000000
+0200
@@ -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": "14bd460ba358875b77fdea6352289e97",
+ "content-hash": "b2ed739eb872f95822228e12e6e681d9",
"packages": [
{
"name": "cocur/slugify",
@@ -94,7 +94,8 @@
"type": "library",
"extra": {
"patches_applied": {
- "Make it possible to get the access token without
triggering a refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";
+ "Make it possible to get the access token without
triggering a refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";,
+ "Support a token save callback":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/c2006642c2cbbf4a5d468f4bda79adb5792b79e0.patch";
}
},
"autoload": {
@@ -712,16 +713,16 @@
},
{
"name": "platformsh/client",
- "version": "v0.23.2",
+ "version": "v0.23.5",
"source": {
"type": "git",
"url":
"https://github.com/platformsh/platformsh-client-php.git";,
- "reference": "028f723d4581b09c28f2ab5029b51a2e9363bd15"
+ "reference": "64209600a7c59e6abe75d1490789c04992e8d30f"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/platformsh/platformsh-client-php/zipball/028f723d4581b09c28f2ab5029b51a2e9363bd15";,
- "reference": "028f723d4581b09c28f2ab5029b51a2e9363bd15",
+ "url":
"https://api.github.com/repos/platformsh/platformsh-client-php/zipball/64209600a7c59e6abe75d1490789c04992e8d30f";,
+ "reference": "64209600a7c59e6abe75d1490789c04992e8d30f",
"shasum": ""
},
"require": {
@@ -738,7 +739,8 @@
"extra": {
"patches": {
"commerceguys/guzzle-oauth2-plugin": {
- "Make it possible to get the access token without
triggering a refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";
+ "Make it possible to get the access token without
triggering a refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";,
+ "Support a token save callback":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/c2006642c2cbbf4a5d468f4bda79adb5792b79e0.patch";
}
}
},
@@ -757,7 +759,7 @@
}
],
"description": "Platform.sh API client",
- "time": "2019-01-16T17:37:27+00:00"
+ "time": "2019-04-15T20:28:10+00:00"
},
{
"name": "platformsh/console-form",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.40.11/dist/manifest.json
new/platformsh-cli-3.40.12/dist/manifest.json
--- old/platformsh-cli-3.40.11/dist/manifest.json 2019-04-04
15:23:21.000000000 +0200
+++ new/platformsh-cli-3.40.12/dist/manifest.json 2019-04-15
22:37:34.000000000 +0200
@@ -1,10 +1,10 @@
[
{
"name": "platform.phar",
- "sha1": "21009f6ecce6ef643f78fe1ea0cffb100d70a6a8",
- "sha256":
"00d61de403085c4585937fe4264cb4b7a66c066447ea71d15f74805a62953984",
- "url":
"https://github.com/platformsh/platformsh-cli/releases/download/v3.40.11/platform.phar";,
- "version": "3.40.11",
+ "sha1": "e150f336bc112287c8ceaa11e57fc770d886d9f3",
+ "sha256":
"cc50e16a80b37758a2c03f7d069e378be72c4f4ab0e242dd4e5476c521aa7f75",
+ "url":
"https://github.com/platformsh/platformsh-cli/releases/download/v3.40.12/platform.phar";,
+ "version": "3.40.12",
"php": {
"min": "5.5.9"
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.40.11/resources/winky/normal
new/platformsh-cli-3.40.12/resources/winky/normal
--- old/platformsh-cli-3.40.11/resources/winky/normal 1970-01-01
01:00:00.000000000 +0100
+++ new/platformsh-cli-3.40.12/resources/winky/normal 2019-04-15
22:37:34.000000000 +0200
@@ -0,0 +1,10 @@
+░░░░░░░░░░░░░░░░░░░░░░░
+░░░░░░███░░░░░███░░░░░░
+░░░░░░█ █░░░░░█ █░░░░░░
+░░░░░░█ █░░░░░█ █░░░░░░
+░░░░░░███░░░░░███░░░░░░
+░░░░░░░░░░░░░░░░░░░░░░░
+░░██████░░███░░██████░░
+░░░░░░░░░░░█░░░░░░░░░░░
+░░██████░░█░█░░██████░░
+░░░░░░░░░░░░░░░░░░░░░░░
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.40.11/resources/winky/twitch
new/platformsh-cli-3.40.12/resources/winky/twitch
--- old/platformsh-cli-3.40.11/resources/winky/twitch 1970-01-01
01:00:00.000000000 +0100
+++ new/platformsh-cli-3.40.12/resources/winky/twitch 2019-04-15
22:37:34.000000000 +0200
@@ -0,0 +1,10 @@
+░░░░░░░░░░░░░░░░░░░░░░░
+░░░░░░███░░░░░███░░░░░░
+░░░░░░█ █░░░░░█ █░░░░░░
+░░░░░░█ █░░░░░█ █░░░░░░
+░░░░░░███░░░░░███░░░░░░
+░░░░░░░░░░░░░░░░░░░░░░░
+░░██████░░███░░██████░░
+░░░░░░░░░░█░█░░░░░░░░░░
+░░██████░░░░░░░██████░░
+░░░░░░░░░░░░░░░░░░░░░░░
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.40.11/resources/winky/wink
new/platformsh-cli-3.40.12/resources/winky/wink
--- old/platformsh-cli-3.40.11/resources/winky/wink 1970-01-01
01:00:00.000000000 +0100
+++ new/platformsh-cli-3.40.12/resources/winky/wink 2019-04-15
22:37:34.000000000 +0200
@@ -0,0 +1,10 @@
+░░░░░░░░░░░░░░░░░░░░░░░
+░░░░░░░░░░░░░░███░░░░░░
+░░░░░░░░░░░░░░█ █░░░░░░
+░░░░░░███░░░░░█ █░░░░░░
+░░░░░░███░░░░░███░░░░░░
+░░░░░░░░░░░░░░░░░░░░░░░
+░░██████░░███░░██████░░
+░░░░░░░░░░░█░░░░░░░░░░░
+░░██████░░█░█░░██████░░
+░░░░░░░░░░░░░░░░░░░░░░░
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.40.11/src/Application.php
new/platformsh-cli-3.40.12/src/Application.php
--- old/platformsh-cli-3.40.11/src/Application.php 2019-04-04
15:23:21.000000000 +0200
+++ new/platformsh-cli-3.40.12/src/Application.php 2019-04-15
22:37:34.000000000 +0200
@@ -206,6 +206,7 @@
$commands[] = new Command\Variable\VariableUpdateCommand();
$commands[] = new Command\WelcomeCommand();
$commands[] = new Command\WebCommand();
+ $commands[] = new Command\WinkyCommand();
$commands[] = new Command\Worker\WorkerListCommand();

return $commands;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/platformsh-cli-3.40.11/src/Command/Auth/BrowserLoginCommand.php
new/platformsh-cli-3.40.12/src/Command/Auth/BrowserLoginCommand.php
--- old/platformsh-cli-3.40.11/src/Command/Auth/BrowserLoginCommand.php
2019-04-04 15:23:21.000000000 +0200
+++ new/platformsh-cli-3.40.12/src/Command/Auth/BrowserLoginCommand.php
2019-04-15 22:37:34.000000000 +0200
@@ -68,10 +68,18 @@
$account['mail']
));

- // USE THE FORCE
- $this->stdErr->writeln('Use the <comment>--force</comment>
(<comment>-f</comment>) option to log in again.');
+ if ($input->isInteractive()) {
+ /** @var \Platformsh\Cli\Service\QuestionHelper
$questionHelper */
+ $questionHelper = $this->getService('question_helper');
+ if (!$questionHelper->confirm('Log in anyway?', false)) {
+ return 1;
+ }
+ } else {
+ // USE THE FORCE
+ $this->stdErr->writeln('Use the <comment>--force</comment>
(<comment>-f</comment>) option to log in again.');

- return 0;
+ return 0;
+ }
} catch (BadResponseException $e) {
if ($e->getResponse() &&
in_array($e->getResponse()->getStatusCode(), [400, 401], true)) {
$this->debug('Already logged in, but a test request
failed. Continuing with login.');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.40.11/src/Command/CommandBase.php
new/platformsh-cli-3.40.12/src/Command/CommandBase.php
--- old/platformsh-cli-3.40.11/src/Command/CommandBase.php 2019-04-04
15:23:21.000000000 +0200
+++ new/platformsh-cli-3.40.12/src/Command/CommandBase.php 2019-04-15
22:37:34.000000000 +0200
@@ -490,9 +490,14 @@
if (!$this->getApplication()->has('local:drush-aliases')) {
return;
}
- // Double-check that the passed project is the current one.
- $currentProject = $this->getCurrentProject();
- if (!$currentProject || $currentProject->id !=
$event->getProject()->id) {
+ // Double-check that the passed project is the current one, and that it
+ // still exists.
+ try {
+ $currentProject = $this->getCurrentProject();
+ if (!$currentProject || $currentProject->id !=
$event->getProject()->id) {
+ return;
+ }
+ } catch (ProjectNotFoundException $e) {
return;
}
// Ignore the project if it doesn't contain a Drupal application.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/platformsh-cli-3.40.11/src/Command/Self/SelfBuildCommand.php
new/platformsh-cli-3.40.12/src/Command/Self/SelfBuildCommand.php
--- old/platformsh-cli-3.40.11/src/Command/Self/SelfBuildCommand.php
2019-04-04 15:23:21.000000000 +0200
+++ new/platformsh-cli-3.40.12/src/Command/Self/SelfBuildCommand.php
2019-04-15 22:37:34.000000000 +0200
@@ -89,16 +89,31 @@
}

if (!$input->getOption('no-composer-rebuild')) {
- $this->stdErr->writeln('Ensuring correct composer dependencies');
+ $this->stdErr->writeln('Ensuring correct composer dependencies.');
+ $this->stdErr->writeln('If this fails, you may need to run
"composer install" manually.');

- // We cannot use --no-dev, as that would exclude the Box tool
itself.
+ // Wipe the vendor directory to be extra sure.
+ $shell->execute(['rm', '-rf', 'vendor'], CLI_ROOT, false);
+
+ // We cannot use --no-dev, as that would exclude the
+ // composer-bin-plugin tool.
$shell->execute([
- $shell->resolveCommand('composer'),
+ 'composer',
'install',
'--classmap-authoritative',
'--no-interaction',
'--no-progress',
], CLI_ROOT, true, false);
+
+ // Install composer-bin-plugin dependencies.
+ $shell->execute([
+ 'composer',
+ 'bin',
+ 'all',
+ 'install',
+ '--no-interaction',
+ '--no-progress',
+ ], CLI_ROOT, true, false);
}

$boxArgs = [CLI_ROOT . '/vendor/bin/box', 'compile',
'--no-interaction'];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.40.11/src/Command/WinkyCommand.php
new/platformsh-cli-3.40.12/src/Command/WinkyCommand.php
--- old/platformsh-cli-3.40.11/src/Command/WinkyCommand.php 1970-01-01
01:00:00.000000000 +0100
+++ new/platformsh-cli-3.40.12/src/Command/WinkyCommand.php 2019-04-15
22:37:34.000000000 +0200
@@ -0,0 +1,32 @@
+<?php
+
+namespace Platformsh\Cli\Command;
+
+use Platformsh\Cli\Console\Winky;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+class WinkyCommand extends CommandBase
+{
+ protected $hiddenInList = true;
+ protected $local = true;
+
+ protected function configure()
+ {
+ $this->setName('winky');
+ }
+
+ protected function execute(InputInterface $input, OutputInterface $output)
+ {
+ $winky = new Winky($output, $this->config()->get('service.name'));
+
+ if (!$output->isDecorated()) {
+ $winky->render();
+ return;
+ }
+
+ while (true) {
+ $winky->render();
+ }
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.40.11/src/Console/Animation.php
new/platformsh-cli-3.40.12/src/Console/Animation.php
--- old/platformsh-cli-3.40.11/src/Console/Animation.php 2019-04-04
15:23:21.000000000 +0200
+++ new/platformsh-cli-3.40.12/src/Console/Animation.php 2019-04-15
22:37:34.000000000 +0200
@@ -7,7 +7,10 @@
class Animation
{
protected $interval;
+
+ /** @var \Platformsh\Cli\Console\AnimationFrame[] */
protected $frames = [];
+
protected $currentFrame = 0;
protected $lastFrame;
protected $output;
@@ -24,8 +27,14 @@
public function __construct(OutputInterface $output, array $frames,
$interval = 500000)
{
$this->output = $output;
- $this->frames = $frames;
$this->interval = $interval;
+
+ foreach ($frames as &$frame) {
+ if (is_string($frame)) {
+ $frame = new AnimationFrame($frame, $interval);
+ }
+ }
+ $this->frames = $frames;
}

/**
@@ -51,8 +60,9 @@
// the last frame.
if ($this->lastFrameTime !== null) {
$timeSince = (microtime(true) - $this->lastFrameTime) * 1000000;
- if ($timeSince < $this->interval) {
- usleep($this->interval - $timeSince);
+ $interval = $this->frames[$this->lastFrame]->getDuration();
+ if ($timeSince < $interval) {
+ usleep($interval - $timeSince);
}
}

@@ -65,12 +75,12 @@
}

// Move the cursor up to overwrite the previous frame.
- $lastFrameHeight = substr_count($this->frames[$this->lastFrame],
"\n") + 1;
+ $lastFrameHeight =
substr_count($this->frames[$this->lastFrame]->__toString(), "\n") + 1;
$this->output->write(sprintf("\033[%dA", $lastFrameHeight));
}

// Display the current frame.
- $this->output->writeln($this->frames[$this->currentFrame]);
+
$this->output->writeln($this->frames[$this->currentFrame]->__toString());

// Set up the next frame.
$this->lastFrame = $this->currentFrame;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/platformsh-cli-3.40.11/src/Console/AnimationFrame.php
new/platformsh-cli-3.40.12/src/Console/AnimationFrame.php
--- old/platformsh-cli-3.40.11/src/Console/AnimationFrame.php 1970-01-01
01:00:00.000000000 +0100
+++ new/platformsh-cli-3.40.12/src/Console/AnimationFrame.php 2019-04-15
22:37:34.000000000 +0200
@@ -0,0 +1,25 @@
+<?php
+
+namespace Platformsh\Cli\Console;
+
+class AnimationFrame
+{
+ private $content;
+ private $duration = 500000;
+
+ public function __construct($content, $duration = 50000)
+ {
+ $this->content = $content;
+ $this->duration = $duration;
+ }
+
+ public function getDuration()
+ {
+ return $this->duration;
+ }
+
+ public function __toString()
+ {
+ return $this->content;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.40.11/src/Console/Winky.php
new/platformsh-cli-3.40.12/src/Console/Winky.php
--- old/platformsh-cli-3.40.11/src/Console/Winky.php 1970-01-01
01:00:00.000000000 +0100
+++ new/platformsh-cli-3.40.12/src/Console/Winky.php 2019-04-15
22:37:34.000000000 +0200
@@ -0,0 +1,59 @@
+<?php
+
+namespace Platformsh\Cli\Console;
+
+use Symfony\Component\Console\Output\OutputInterface;
+
+class Winky extends Animation
+{
+ /**
+ * @param OutputInterface $output
+ * @param string $signature
+ */
+ public function __construct(OutputInterface $output, $signature = '')
+ {
+ $dir = CLI_ROOT . '/resources/winky';
+
+ $sources = [];
+ $sources['normal'] = file_get_contents($dir . '/normal');
+ $sources['wink'] = file_get_contents($dir . '/wink');
+ $sources['twitch'] = file_get_contents($dir . '/twitch');
+
+ list($firstLine,) = explode("\n", trim($sources['normal']), 2);
+ $width = mb_strlen($firstLine);
+
+ // Replace Unicode characters with ANSI background colors.
+ if ($output->isDecorated()) {
+ foreach ($sources as &$source) {
+ $source = preg_replace_callback('/([\x{2588}\x{2591} ])\1*/u',
function (array $matches) {
+ $styles = [
+ ' ' => "\033[47m",
+ '█' => "\033[40m",
+ '░' => "\033[48;5;217m",
+ ];
+ $char = mb_substr($matches[0], 0, 1);
+
+ return $styles[$char] . str_repeat(' ',
mb_strlen($matches[0])) . "\033[0m";
+ }, $source);
+ }
+ }
+
+ // Add the indent and signature.
+ $indent = ' ';
+ if (strlen($signature) > 0) {
+ $signatureIndent = str_repeat(' ', strlen($indent) + floor($width
/ 2) - floor(strlen($signature) / 2));
+ $signature = "\n" . $signatureIndent . $signature;
+ }
+ $sources = array_map(function ($source) use ($indent, $signature) {
+ return "\n" . preg_replace('/^/m', $indent, $source) . $signature
. "\n";
+ }, $sources);
+
+ $frames = [];
+ $frames[] = new AnimationFrame($sources['normal'], 1200000);
+ $frames[] = new AnimationFrame($sources['wink'], 200000);
+ $frames[] = new AnimationFrame($sources['normal'], 1200000);
+ $frames[] = new AnimationFrame($sources['twitch'], 150000);
+
+ parent::__construct($output, $frames);
+ }
+}

++++++ 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 2019-04-05 16:46:00.818200715 +0200
+++ new/vendor/autoload.php 2019-04-16 15:59:27.459863322 +0200
@@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

-return ComposerAutoloaderInit0b2b3c3bfa3add2029d93a2fa3570ed8::getLoader();
+return ComposerAutoloaderInit1b7ebbc349b6dcb96ebfff8eab4420d5::getLoader();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/vendor/commerceguys/guzzle-oauth2-plugin/PATCHES.txt
new/vendor/commerceguys/guzzle-oauth2-plugin/PATCHES.txt
--- old/vendor/commerceguys/guzzle-oauth2-plugin/PATCHES.txt 2019-04-05
16:45:59.814191411 +0200
+++ new/vendor/commerceguys/guzzle-oauth2-plugin/PATCHES.txt 2019-04-16
15:59:24.635837323 +0200
@@ -5,3 +5,7 @@
Source:
https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch


+Support a token save callback
+Source:
https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/c2006642c2cbbf4a5d468f4bda79adb5792b79e0.patch
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/vendor/commerceguys/guzzle-oauth2-plugin/src/Oauth2Subscriber.php
new/vendor/commerceguys/guzzle-oauth2-plugin/src/Oauth2Subscriber.php
--- old/vendor/commerceguys/guzzle-oauth2-plugin/src/Oauth2Subscriber.php
2019-04-05 16:45:59.814191411 +0200
+++ new/vendor/commerceguys/guzzle-oauth2-plugin/src/Oauth2Subscriber.php
2019-04-16 15:59:24.631837286 +0200
@@ -22,6 +22,9 @@
/** @var RefreshTokenGrantTypeInterface */
protected $refreshTokenGrantType;

+ /** @var callable|null */
+ protected $tokenSave;
+
/**
* Create a new Oauth2 subscriber.
*
@@ -55,8 +58,14 @@
$request = $event->getRequest();
if ($request->getConfig()->get('auth') == 'oauth2' &&
!$request->getConfig()->get('retried')) {
if ($token = $this->acquireAccessToken()) {
+ // Save the new token.
$this->accessToken = $token;
$this->refreshToken = $token->getRefreshToken();
+ if (is_callable($this->tokenSave)) {
+ call_user_func($this->tokenSave, $token);
+ }
+
+ // Retry the request.
$request->getConfig()->set('retried', true);
$event->intercept($event->getClient()->send($request));
}
@@ -174,4 +183,16 @@
}
$this->refreshToken = $refreshToken;
}
+
+ /**
+ * Set a callback that will save a token whenever a new one is acquired.
+ *
+ * @param callable $tokenSave
+ * A callback accepting one argument (the AccessToken) that will save a
+ * token.
+ */
+ public function setTokenSaveCallback(callable $tokenSave)
+ {
+ $this->tokenSave = $tokenSave;
+ }
}
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 2019-04-05 16:46:00.818200715
+0200
+++ new/vendor/composer/autoload_real.php 2019-04-16 15:59:27.459863322
+0200
@@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

-class ComposerAutoloaderInit0b2b3c3bfa3add2029d93a2fa3570ed8
+class ComposerAutoloaderInit1b7ebbc349b6dcb96ebfff8eab4420d5
{
private static $loader;

@@ -19,15 +19,15 @@
return self::$loader;
}

-
spl_autoload_register(array('ComposerAutoloaderInit0b2b3c3bfa3add2029d93a2fa3570ed8',
'loadClassLoader'), true, true);
+
spl_autoload_register(array('ComposerAutoloaderInit1b7ebbc349b6dcb96ebfff8eab4420d5',
'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-
spl_autoload_unregister(array('ComposerAutoloaderInit0b2b3c3bfa3add2029d93a2fa3570ed8',
'loadClassLoader'));
+
spl_autoload_unregister(array('ComposerAutoloaderInit1b7ebbc349b6dcb96ebfff8eab4420d5',
'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\ComposerStaticInit0b2b3c3bfa3add2029d93a2fa3570ed8::getInitializer($loader));
+
call_user_func(\Composer\Autoload\ComposerStaticInit1b7ebbc349b6dcb96ebfff8eab4420d5::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\ComposerStaticInit0b2b3c3bfa3add2029d93a2fa3570ed8::$files;
+ $includeFiles =
Composer\Autoload\ComposerStaticInit1b7ebbc349b6dcb96ebfff8eab4420d5::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
- composerRequire0b2b3c3bfa3add2029d93a2fa3570ed8($fileIdentifier,
$file);
+ composerRequire1b7ebbc349b6dcb96ebfff8eab4420d5($fileIdentifier,
$file);
}

return $loader;
}
}

-function composerRequire0b2b3c3bfa3add2029d93a2fa3570ed8($fileIdentifier,
$file)
+function composerRequire1b7ebbc349b6dcb96ebfff8eab4420d5($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 2019-04-05 16:46:00.818200715
+0200
+++ new/vendor/composer/autoload_static.php 2019-04-16 15:59:27.459863322
+0200
@@ -4,7 +4,7 @@

namespace Composer\Autoload;

-class ComposerStaticInit0b2b3c3bfa3add2029d93a2fa3570ed8
+class ComposerStaticInit1b7ebbc349b6dcb96ebfff8eab4420d5
{
public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' .
'/symfony/polyfill-ctype/bootstrap.php',
@@ -201,9 +201,9 @@
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
- $loader->prefixLengthsPsr4 =
ComposerStaticInit0b2b3c3bfa3add2029d93a2fa3570ed8::$prefixLengthsPsr4;
- $loader->prefixDirsPsr4 =
ComposerStaticInit0b2b3c3bfa3add2029d93a2fa3570ed8::$prefixDirsPsr4;
- $loader->classMap =
ComposerStaticInit0b2b3c3bfa3add2029d93a2fa3570ed8::$classMap;
+ $loader->prefixLengthsPsr4 =
ComposerStaticInit1b7ebbc349b6dcb96ebfff8eab4420d5::$prefixLengthsPsr4;
+ $loader->prefixDirsPsr4 =
ComposerStaticInit1b7ebbc349b6dcb96ebfff8eab4420d5::$prefixDirsPsr4;
+ $loader->classMap =
ComposerStaticInit1b7ebbc349b6dcb96ebfff8eab4420d5::$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 2019-04-05 16:46:00.146194487 +0200
+++ new/vendor/composer/installed.json 2019-04-16 15:59:27.015859234 +0200
@@ -91,7 +91,8 @@
"type": "library",
"extra": {
"patches_applied": {
- "Make it possible to get the access token without triggering a
refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";
+ "Make it possible to get the access token without triggering a
refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";,
+ "Support a token save callback":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/c2006642c2cbbf4a5d468f4bda79adb5792b79e0.patch";
}
},
"installation-source": "dist",
@@ -731,17 +732,17 @@
},
{
"name": "platformsh/client",
- "version": "v0.23.2",
- "version_normalized": "0.23.2.0",
+ "version": "v0.23.5",
+ "version_normalized": "0.23.5.0",
"source": {
"type": "git",
"url": "https://github.com/platformsh/platformsh-client-php.git";,
- "reference": "028f723d4581b09c28f2ab5029b51a2e9363bd15"
+ "reference": "64209600a7c59e6abe75d1490789c04992e8d30f"
},
"dist": {
"type": "zip",
- "url":
"https://api.github.com/repos/platformsh/platformsh-client-php/zipball/028f723d4581b09c28f2ab5029b51a2e9363bd15";,
- "reference": "028f723d4581b09c28f2ab5029b51a2e9363bd15",
+ "url":
"https://api.github.com/repos/platformsh/platformsh-client-php/zipball/64209600a7c59e6abe75d1490789c04992e8d30f";,
+ "reference": "64209600a7c59e6abe75d1490789c04992e8d30f",
"shasum": ""
},
"require": {
@@ -754,12 +755,13 @@
"require-dev": {
"phpunit/phpunit": "~4.5"
},
- "time": "2019-01-16T17:37:27+00:00",
+ "time": "2019-04-15T20:28:10+00:00",
"type": "library",
"extra": {
"patches": {
"commerceguys/guzzle-oauth2-plugin": {
- "Make it possible to get the access token without
triggering a refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";
+ "Make it possible to get the access token without
triggering a refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";,
+ "Support a token save callback":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/c2006642c2cbbf4a5d468f4bda79adb5792b79e0.patch";
}
}
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/vendor/platformsh/client/composer.json
new/vendor/platformsh/client/composer.json
--- old/vendor/platformsh/client/composer.json 2019-01-16 18:37:27.000000000
+0100
+++ new/vendor/platformsh/client/composer.json 2019-04-15 22:28:10.000000000
+0200
@@ -30,7 +30,8 @@
"extra": {
"patches": {
"commerceguys/guzzle-oauth2-plugin": {
- "Make it possible to get the access token without triggering a
refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";
+ "Make it possible to get the access token without triggering a
refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";,
+ "Support a token save callback":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/c2006642c2cbbf4a5d468f4bda79adb5792b79e0.patch";
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/vendor/platformsh/client/composer.lock
new/vendor/platformsh/client/composer.lock
--- old/vendor/platformsh/client/composer.lock 2019-01-16 18:37:27.000000000
+0100
+++ new/vendor/platformsh/client/composer.lock 2019-04-15 22:28:10.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": "03d139694c2b711bea00ded2c7c0f173",
+ "content-hash": "198d2060c13d56c7011de4748478349a",
"packages": [
{
"name": "cocur/slugify",
@@ -94,7 +94,8 @@
"type": "library",
"extra": {
"patches_applied": {
- "Make it possible to get the access token without
triggering a refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";
+ "Make it possible to get the access token without
triggering a refresh":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/d2d720015813185d1ad4fa12884cab9bac6a8b25.patch";,
+ "Support a token save callback":
"https://github.com/pjcdawkins/guzzle-oauth2-plugin/commit/c2006642c2cbbf4a5d468f4bda79adb5792b79e0.patch";
}
},
"autoload": {
@@ -1160,6 +1161,7 @@
"mock",
"xunit"
],
+ "abandoned": true,
"time": "2015-10-02T06:51:40+00:00"
},
{
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 2019-01-16
18:37:27.000000000 +0100
+++ new/vendor/platformsh/client/src/Connection/Connector.php 2019-04-15
22:28:10.000000000 +0200
@@ -322,6 +322,10 @@
$this->session->get('expires') ?: null
);
}
+
+ $this->oauth2Plugin->setTokenSaveCallback(function (AccessToken
$token) {
+ $this->saveToken($token);
+ });
}

return $this->oauth2Plugin;
@@ -377,22 +381,6 @@
];
$client = $this->getGuzzleClient($options);

- // The access token might change during the request cycle, because
- // the OAuth2Subscriber may refresh it. So we ensure the access
- // token is saved immediately after each successful request.
- $client->getEmitter()->on('complete', function (CompleteEvent
$event) use ($oauth2) {
- if ($event->getRequest()->getConfig()->get('auth') !==
'oauth2') {
- return;
- }
- $response = $event->getResponse();
- if ($response && substr($response->getStatusCode(), 0, 1) ===
'2') {
- $token = $oauth2->getAccessToken(false);
- if ($token !== null) {
- $this->saveToken($token);
- }
- }
- });
-
$this->setUpCache($client);
$this->client = $client;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/vendor/platformsh/client/src/Model/Backup.php
new/vendor/platformsh/client/src/Model/Backup.php
--- old/vendor/platformsh/client/src/Model/Backup.php 2019-01-16
18:37:27.000000000 +0100
+++ new/vendor/platformsh/client/src/Model/Backup.php 2019-04-15
22:28:10.000000000 +0200
@@ -15,7 +15,7 @@
* @property-read string $updated_at
* @property-read string $expires_at
*/
-class Backup extends ApiResourceBase
+class Backup extends Resource
{
const STATUS_CREATED = 'CREATED';
const STATUS_DELETED = 'DELETED';
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 2019-01-16
18:37:27.000000000 +0100
+++ new/vendor/platformsh/client/src/Model/Environment.php 2019-04-15
22:28:10.000000000 +0200
@@ -103,7 +103,7 @@
return $urls[$app];
}

- return $this->constructLegacySshUrl($app);
+ return $this->constructLegacySshUrl();
}

/**


< Previous Next >
This Thread