Hello community,
here is the log from the commit of package platformsh-cli for
openSUSE:Leap:15.2 checked in at 2020-04-30 18:52:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/platformsh-cli (Old)
and /work/SRC/openSUSE:Leap:15.2/.platformsh-cli.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "platformsh-cli"
Thu Apr 30 18:52:49 2020 rev:44 rq:799008 version:3.54.1
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/platformsh-cli/platformsh-cli.changes
2020-04-17 13:39:17.864299068 +0200
+++
/work/SRC/openSUSE:Leap:15.2/.platformsh-cli.new.2738/platformsh-cli.changes
2020-04-30 18:53:49.544900779 +0200
@@ -1,0 +2,11 @@
+Tue Apr 28 18:41:16 UTC 2020 - [email protected]
+
+- Update to version 3.54.1:
+ * Release v3.54.1
+ * Revert "Accept the variable value from stdin in variable:create and
variable:update commands"
+ * Cover set-remote in the project:create command too
+ * Allow for access denied to the old project in the project:set-remote
command
+ * Integrations: replace foo/bar example with owner/repository (#921)
+ * Ensure all token data is available after reauthenticating, for
completeness' sake
+
+-------------------------------------------------------------------
Old:
----
platformsh-cli-3.54.0.tar.xz
New:
----
platformsh-cli-3.54.1.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ platformsh-cli.spec ++++++
--- /var/tmp/diff_new_pack.Z3Zw4N/_old 2020-04-30 18:53:49.996901733 +0200
+++ /var/tmp/diff_new_pack.Z3Zw4N/_new 2020-04-30 18:53:49.996901733 +0200
@@ -17,7 +17,7 @@
Name: platformsh-cli
-Version: 3.54.0
+Version: 3.54.1
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.Z3Zw4N/_old 2020-04-30 18:53:50.024901793 +0200
+++ /var/tmp/diff_new_pack.Z3Zw4N/_new 2020-04-30 18:53:50.024901793 +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.54.0</param>
+ <param name="revision">refs/tags/v3.54.1</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.Z3Zw4N/_old 2020-04-30 18:53:50.044901835 +0200
+++ /var/tmp/diff_new_pack.Z3Zw4N/_new 2020-04-30 18:53:50.044901835 +0200
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/platformsh/platformsh-cli.git</param>
- <param
name="changesrevision">440efd66b1e61cbbb4f661f0a519d75e0f109b40</param>
+ <param
name="changesrevision">4a6bb0ddcf1c409826cbcde3e5c362cfaba0809d</param>
</service>
</servicedata>
++++++ platformsh-cli-3.54.0.tar.xz -> platformsh-cli-3.54.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.54.0/dist/manifest.json
new/platformsh-cli-3.54.1/dist/manifest.json
--- old/platformsh-cli-3.54.0/dist/manifest.json 2020-04-15
13:54:14.000000000 +0200
+++ new/platformsh-cli-3.54.1/dist/manifest.json 2020-04-28
14:13:50.000000000 +0200
@@ -17,10 +17,10 @@
},
{
"name": "platform.phar",
- "sha1": "1e90f764feb4203f79eb7b68158ffd76d9dd8da3",
- "sha256":
"06ca91da1ea38b26eedf72fbee2289a3372179accd50f148f32fcdb1c475fdf5",
- "url":
"https://github.com/platformsh/platformsh-cli/releases/download/v3.54.0/platform.phar",
- "version": "3.54.0",
+ "sha1": "28e33e6f4a1b43d2c6981c24ac7eb61991228026",
+ "sha256":
"a4129e36dfb7d2a90a0dd953a67daef4f5dc193676c503c4d981647b79bf9716",
+ "url":
"https://github.com/platformsh/platformsh-cli/releases/download/v3.54.1/platform.phar",
+ "version": "3.54.1",
"php": {
"min": "5.5.9"
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/platformsh-cli-3.54.0/src/Command/Integration/IntegrationCommandBase.php
new/platformsh-cli-3.54.1/src/Command/Integration/IntegrationCommandBase.php
---
old/platformsh-cli-3.54.0/src/Command/Integration/IntegrationCommandBase.php
2020-04-15 13:54:14.000000000 +0200
+++
new/platformsh-cli-3.54.1/src/Command/Integration/IntegrationCommandBase.php
2020-04-28 14:13:50.000000000 +0200
@@ -185,8 +185,8 @@
'bitbucket_server',
'github',
]],
- 'description' => 'The repository to track (e.g. \'foo/bar\')',
- 'questionLine' => 'The repository (e.g. \'foo/bar\')',
+ 'description' => 'The repository to track (e.g.
\'owner/repository\')',
+ 'questionLine' => 'The repository (e.g. \'owner/repository\')',
'validator' => function ($string) {
return substr_count($string, '/', 1) === 1;
},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/platformsh-cli-3.54.0/src/Command/Project/ProjectCreateCommand.php
new/platformsh-cli-3.54.1/src/Command/Project/ProjectCreateCommand.php
--- old/platformsh-cli-3.54.0/src/Command/Project/ProjectCreateCommand.php
2020-04-15 13:54:14.000000000 +0200
+++ new/platformsh-cli-3.54.1/src/Command/Project/ProjectCreateCommand.php
2020-04-28 14:13:50.000000000 +0200
@@ -2,6 +2,7 @@
namespace Platformsh\Cli\Command\Project;
+use GuzzleHttp\Exception\BadResponseException;
use GuzzleHttp\Exception\ConnectException;
use Platformsh\Cli\Command\CommandBase;
use Platformsh\Cli\Console\Bot;
@@ -83,6 +84,12 @@
$currentProject = $this->getCurrentProject();
} catch (ProjectNotFoundException $e) {
$currentProject = false;
+ } catch (BadResponseException $e) {
+ if ($e->getResponse() && $e->getResponse()->getStatusCode()
=== 403) {
+ $currentProject = false;
+ } else {
+ throw $e;
+ }
}
$this->stdErr->writeln('Git repository detected: <info>' .
$gitRoot . '</info>');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/platformsh-cli-3.54.0/src/Command/Project/ProjectSetRemoteCommand.php
new/platformsh-cli-3.54.1/src/Command/Project/ProjectSetRemoteCommand.php
--- old/platformsh-cli-3.54.0/src/Command/Project/ProjectSetRemoteCommand.php
2020-04-15 13:54:14.000000000 +0200
+++ new/platformsh-cli-3.54.1/src/Command/Project/ProjectSetRemoteCommand.php
2020-04-28 14:13:50.000000000 +0200
@@ -1,6 +1,7 @@
<?php
namespace Platformsh\Cli\Command\Project;
+use GuzzleHttp\Exception\BadResponseException;
use Platformsh\Cli\Command\CommandBase;
use Platformsh\Cli\Exception\ProjectNotFoundException;
use Symfony\Component\Console\Input\InputArgument;
@@ -48,6 +49,12 @@
$currentProject = $this->getCurrentProject();
} catch (ProjectNotFoundException $e) {
$currentProject = false;
+ } catch (BadResponseException $e) {
+ if ($e->getResponse() && $e->getResponse()->getStatusCode() ===
403) {
+ $currentProject = false;
+ } else {
+ throw $e;
+ }
}
if ($currentProject && $currentProject->id === $project->id) {
$this->stdErr->writeln(sprintf(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/platformsh-cli-3.54.0/src/Command/Variable/VariableCommandBase.php
new/platformsh-cli-3.54.1/src/Command/Variable/VariableCommandBase.php
--- old/platformsh-cli-3.54.0/src/Command/Variable/VariableCommandBase.php
2020-04-15 13:54:14.000000000 +0200
+++ new/platformsh-cli-3.54.1/src/Command/Variable/VariableCommandBase.php
2020-04-28 14:13:50.000000000 +0200
@@ -265,18 +265,4 @@
'env:' => 'env: The variable will be exposed directly, e.g. as
<comment>$' . strtoupper($name) . '</comment>.',
];
}
-
- /**
- * Reads the variable value from stdin.
- */
- protected function readValueFromStdin(InputInterface $input)
- {
- if ($input->getOption('value') === null) {
- $contents = stream_get_contents(STDIN);
- if ($contents !== false && $contents !== '') {
- $input->setOption('value', $contents);
- $this->debug('Read variable value from stdin');
- }
- }
- }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/platformsh-cli-3.54.0/src/Command/Variable/VariableCreateCommand.php
new/platformsh-cli-3.54.1/src/Command/Variable/VariableCreateCommand.php
--- old/platformsh-cli-3.54.0/src/Command/Variable/VariableCreateCommand.php
2020-04-15 13:54:14.000000000 +0200
+++ new/platformsh-cli-3.54.1/src/Command/Variable/VariableCreateCommand.php
2020-04-28 14:13:50.000000000 +0200
@@ -70,9 +70,6 @@
return 1;
}
- // Accept 'value' from stdin.
- $this->readValueFromStdin($input);
-
/** @var \Platformsh\Cli\Service\QuestionHelper $questionHelper */
$questionHelper = $this->getService('question_helper');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/platformsh-cli-3.54.0/src/Command/Variable/VariableUpdateCommand.php
new/platformsh-cli-3.54.1/src/Command/Variable/VariableUpdateCommand.php
--- old/platformsh-cli-3.54.0/src/Command/Variable/VariableUpdateCommand.php
2020-04-15 13:54:14.000000000 +0200
+++ new/platformsh-cli-3.54.1/src/Command/Variable/VariableUpdateCommand.php
2020-04-28 14:13:50.000000000 +0200
@@ -42,9 +42,6 @@
return 1;
}
- // Accept 'value' from stdin.
- $this->readValueFromStdin($input);
-
$values = [];
$fields = $this->form->getFields();
foreach ($variable->getProperties() as $property => $value) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/platformsh-cli-3.54.0/src/Service/Api.php
new/platformsh-cli-3.54.1/src/Service/Api.php
--- old/platformsh-cli-3.54.0/src/Service/Api.php 2020-04-15
13:54:14.000000000 +0200
+++ new/platformsh-cli-3.54.1/src/Service/Api.php 2020-04-28
14:13:50.000000000 +0200
@@ -22,6 +22,7 @@
use Platformsh\Client\Model\ProjectAccess;
use Platformsh\Client\Model\Resource as ApiResource;
use Platformsh\Client\PlatformClient;
+use Platformsh\Client\Session\SessionInterface;
use Platformsh\Client\Session\Storage\File;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
@@ -319,11 +320,35 @@
$this->dispatcher->dispatch('login_required');
$session = $this->getClient(false)->getConnector()->getSession();
- if (!$session->get('accessToken')) {
+
+ return $this->tokenFromSession($session);
+ }
+
+ /**
+ * Loads and returns an AccessToken, if possible, from a session.
+ *
+ * @param SessionInterface $session
+ *
+ * @return AccessToken|null
+ */
+ private function tokenFromSession(SessionInterface $session) {
+ if (!$accessToken = $session->get('accessToken')) {
return null;
}
+ $map = [
+ 'expires' => 'expires',
+ 'refreshToken' => 'refresh_token',
+ 'scope' => 'scope',
+ ];
+ $tokenData = [];
+ foreach ($map as $sessionKey => $tokenKey) {
+ $value = $session->get($sessionKey);
+ if ($value !== false && $value !== null) {
+ $tokenData[$tokenKey] = $value;
+ }
+ }
- return new AccessToken($session->get('accessToken'),
$session->get('tokenType') ?: null, ['expires' => $session->get('expires') ?:
null]);
+ return new AccessToken($tokenData['access_token'],
$session->get('tokenType') ?: null, $tokenData);
}
/**
++++++ 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 2020-04-16 05:13:13.120584925 +0200
+++ new/vendor/autoload.php 2020-04-28 20:41:19.328721127 +0200
@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
-return ComposerAutoloaderInita5a20c44729d051bb2c404e0b78e24cb::getLoader();
+return ComposerAutoloaderInitd5735c496f4829edb7b4a364dc509a9a::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 2020-04-16 05:13:13.120584925
+0200
+++ new/vendor/composer/autoload_real.php 2020-04-28 20:41:19.328721127
+0200
@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
-class ComposerAutoloaderInita5a20c44729d051bb2c404e0b78e24cb
+class ComposerAutoloaderInitd5735c496f4829edb7b4a364dc509a9a
{
private static $loader;
@@ -19,15 +19,15 @@
return self::$loader;
}
-
spl_autoload_register(array('ComposerAutoloaderInita5a20c44729d051bb2c404e0b78e24cb',
'loadClassLoader'), true, true);
+
spl_autoload_register(array('ComposerAutoloaderInitd5735c496f4829edb7b4a364dc509a9a',
'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-
spl_autoload_unregister(array('ComposerAutoloaderInita5a20c44729d051bb2c404e0b78e24cb',
'loadClassLoader'));
+
spl_autoload_unregister(array('ComposerAutoloaderInitd5735c496f4829edb7b4a364dc509a9a',
'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\ComposerStaticInita5a20c44729d051bb2c404e0b78e24cb::getInitializer($loader));
+
call_user_func(\Composer\Autoload\ComposerStaticInitd5735c496f4829edb7b4a364dc509a9a::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\ComposerStaticInita5a20c44729d051bb2c404e0b78e24cb::$files;
+ $includeFiles =
Composer\Autoload\ComposerStaticInitd5735c496f4829edb7b4a364dc509a9a::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
- composerRequirea5a20c44729d051bb2c404e0b78e24cb($fileIdentifier,
$file);
+ composerRequired5735c496f4829edb7b4a364dc509a9a($fileIdentifier,
$file);
}
return $loader;
}
}
-function composerRequirea5a20c44729d051bb2c404e0b78e24cb($fileIdentifier,
$file)
+function composerRequired5735c496f4829edb7b4a364dc509a9a($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 2020-04-16 05:13:13.120584925
+0200
+++ new/vendor/composer/autoload_static.php 2020-04-28 20:41:19.328721127
+0200
@@ -4,7 +4,7 @@
namespace Composer\Autoload;
-class ComposerStaticInita5a20c44729d051bb2c404e0b78e24cb
+class ComposerStaticInitd5735c496f4829edb7b4a364dc509a9a
{
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 =
ComposerStaticInita5a20c44729d051bb2c404e0b78e24cb::$prefixLengthsPsr4;
- $loader->prefixDirsPsr4 =
ComposerStaticInita5a20c44729d051bb2c404e0b78e24cb::$prefixDirsPsr4;
- $loader->classMap =
ComposerStaticInita5a20c44729d051bb2c404e0b78e24cb::$classMap;
+ $loader->prefixLengthsPsr4 =
ComposerStaticInitd5735c496f4829edb7b4a364dc509a9a::$prefixLengthsPsr4;
+ $loader->prefixDirsPsr4 =
ComposerStaticInitd5735c496f4829edb7b4a364dc509a9a::$prefixDirsPsr4;
+ $loader->classMap =
ComposerStaticInitd5735c496f4829edb7b4a364dc509a9a::$classMap;
}, null, ClassLoader::class);
}