Hello community, here is the log from the commit of package platformsh-cli for openSUSE:Factory checked in at 2019-10-09 15:19:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/platformsh-cli (Old) and /work/SRC/openSUSE:Factory/.platformsh-cli.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "platformsh-cli" Wed Oct 9 15:19:46 2019 rev:82 rq:736322 version:3.49.0 Changes: -------- --- /work/SRC/openSUSE:Factory/platformsh-cli/platformsh-cli.changes 2019-09-26 20:41:18.258531226 +0200 +++ /work/SRC/openSUSE:Factory/.platformsh-cli.new.2352/platformsh-cli.changes 2019-10-09 15:19:47.828445756 +0200 @@ -1,0 +2,40 @@ +Tue Oct 08 19:02:39 UTC 2019 - [email protected] + +- Update to version 3.49.0: + * Release v3.49.0 + * Improve deprecation message for push --branch + * Allow hash to wrap in commit list + * Improve help for old, deprecated variable commands + * A little colour in "No mounts found" + * Make unit tests verbose + * Unnecessary variable in installer + * Refine description of --yes and --no + * Deprecate 3 options in commit:get command + * Unused variable + * Fix --schema help in db:sql command + * Event subscriber: convert from deprecated console.exception to newer console.error + * Avoid namespace conflict + * Use log stream in waitMultiple() + * Make activity success/failure messages consistent + * Fix URL formatting in tunnel:single command + * Fix activities being lost in waitMultiple() + * Fix swapped question text in push command + * Fix property not found error in decode command with an empty object + * Increase default stream context timeout + * Allow the mount:list and mount:size commands to run locally on the container (#857) + * Wait for remaining activities in the push command + * Display simple table (no messages) in integration:list if the format is machine readable + +------------------------------------------------------------------- +Thu Sep 26 13:43:48 UTC 2019 - [email protected] + +- Update to version 3.48.2: + * Release v3.48.2 + * Avoid unnecessary context message in activity:log + * Theoretical ActivityMonitor bugfix [skip changelog] + * Newline before activity log + * Remove extra messages (too verbose output) in backup commands + * Improve --activate in push command (#858) + * Fix combination of --activate and --branch in push command + +------------------------------------------------------------------- Old: ---- platformsh-cli-3.48.1.tar.xz New: ---- platformsh-cli-3.49.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ platformsh-cli.spec ++++++ --- /var/tmp/diff_new_pack.hOWIgL/_old 2019-10-09 15:19:48.932442909 +0200 +++ /var/tmp/diff_new_pack.hOWIgL/_new 2019-10-09 15:19:48.936442899 +0200 @@ -17,7 +17,7 @@ Name: platformsh-cli -Version: 3.48.1 +Version: 3.49.0 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.hOWIgL/_old 2019-10-09 15:19:48.964442827 +0200 +++ /var/tmp/diff_new_pack.hOWIgL/_new 2019-10-09 15:19:48.964442827 +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.48.1</param> + <param name="revision">refs/tags/v3.49.0</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.hOWIgL/_old 2019-10-09 15:19:48.984442776 +0200 +++ /var/tmp/diff_new_pack.hOWIgL/_new 2019-10-09 15:19:48.984442776 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/platformsh/platformsh-cli.git</param> - <param name="changesrevision">3f960466bf40dcdd444bd86c42eee4ebefb8c68f</param> + <param name="changesrevision">0fd5589f730fd0b1bc96bf4223e153681966c057</param> </service> </servicedata> ++++++ platformsh-cli-3.48.1.tar.xz -> platformsh-cli-3.49.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/dist/installer.php new/platformsh-cli-3.49.0/dist/installer.php --- old/platformsh-cli-3.48.1/dist/installer.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/dist/installer.php 2019-10-08 19:57:59.000000000 +0200 @@ -448,11 +448,9 @@ * @return string */ private function getOption($name) { - $value = ''; foreach ($this->argv as $key => $arg) { if (strpos($arg, '--' . $name . '=') === 0) { - $value = substr($arg, strlen('--' . $name . '=')); - break; + return substr($arg, strlen('--' . $name . '=')); } $next = isset($this->argv[$key + 1]) && substr($this->argv[$key + 1], 0, 1) !== '-' ? $this->argv[$key + 1] @@ -461,12 +459,11 @@ if ($next === '') { throw new \InvalidArgumentException('Option --' . $name . ' requires a value'); } - $value = $next; - break; + return $next; } } - return $value; + return ''; } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/dist/manifest.json new/platformsh-cli-3.49.0/dist/manifest.json --- old/platformsh-cli-3.48.1/dist/manifest.json 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/dist/manifest.json 2019-10-08 19:57:59.000000000 +0200 @@ -17,10 +17,10 @@ }, { "name": "platform.phar", - "sha1": "9daaba6fdf5c7dd49c29e625eb7780242be15884", - "sha256": "0cb0494695ce00567aeca984d43699d653dab0525671b72c38fb9cc5f08aba6f", - "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.48.1/platform.phar", - "version": "3.48.1", + "sha1": "5be35ff708b0ae1561de298060d8ed0fc7b6dfd2", + "sha256": "7c09f9ee8041969af13b5c1f12145a10646e15923f7b4e2da22d295393f3a77e", + "url": "https://github.com/platformsh/platformsh-cli/releases/download/v3.49.0/platform.phar", + "version": "3.49.0", "php": { "min": "5.5.9" }, @@ -228,6 +228,11 @@ "notes": "* Rename 'snapshot' commands to 'backup', to match the API and Management Console.\n* Implement streaming activity logs.\n - Add --timestamps (-t) option to the activity:log command.\n - Report the real start time in the activity progress bar.\n* Significantly reduce default cache lifetimes (due to API performance improvements).", "show from": "3.47.0", "hide from": "3.48.0" + }, + { + "notes": "New features:\n\n* Allow the mount:list and mount:size commands to run locally on the container.\n\nOther changes:\n\n* Allow the SHA hash to wrap in the commit:list (commits) table.\n* Improve help for old, deprecated variable commands.\n* Refine description of --yes and --no options.\n* Deprecate 3 unused options in the commit:get command.\n* Fix --schema help in the db:sql command.\n* Make activity success/failure messages consistent.\n* Fix URL formatting in tunnel:single command output.\n* Fix property not found error in decode command with an empty object.\n* Display simple table (no messages) in integration:list if the --format is tsv or csv.\n* Changes to the environment:push (push) command:\n - Improve deprecation message for the --branch option.\n - Fix swapped question text for new/existing environments.\n - Wait for remaining activities.\n* Changes relating to waiting for multiple activities:\n - Fix activities being lost when reporting status after waiting.\n - Switch to the activity log stream for failed activities after waiting.\n - Increase timeout for initially fetching the log stream.", + "show from": "3.48.0", + "hide from": "3.49.0" } ] } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/scripts/test/slow.sh new/platformsh-cli-3.49.0/scripts/test/slow.sh --- old/platformsh-cli-3.48.1/scripts/test/slow.sh 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/scripts/test/slow.sh 2019-10-08 19:57:59.000000000 +0200 @@ -2,4 +2,4 @@ # Runs slow PhpUnit tests. # This must be run from the repository root. -./vendor/bin/phpunit -c ./phpunit.xml --group slow +./vendor/bin/phpunit -c ./phpunit.xml --group slow --verbose diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/scripts/test/unit.sh new/platformsh-cli-3.49.0/scripts/test/unit.sh --- old/platformsh-cli-3.48.1/scripts/test/unit.sh 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/scripts/test/unit.sh 2019-10-08 19:57:59.000000000 +0200 @@ -2,4 +2,4 @@ # Runs PhpUnit tests. # This must be run from the repository root. -./vendor/bin/phpunit -c ./phpunit.xml --coverage-text --exclude-group slow +./vendor/bin/phpunit -c ./phpunit.xml --coverage-text --exclude-group slow --verbose diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Application.php new/platformsh-cli-3.49.0/src/Application.php --- old/platformsh-cli-3.48.1/src/Application.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Application.php 2019-10-08 19:57:59.000000000 +0200 @@ -62,8 +62,8 @@ new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'), new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages'), new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'), - new InputOption('--yes', '-y', InputOption::VALUE_NONE, 'Answer "yes" to all prompts; disable interaction'), - new InputOption('--no', '-n', InputOption::VALUE_NONE, 'Answer "no" to all prompts'), + new InputOption('--yes', '-y', InputOption::VALUE_NONE, 'Answer "yes" to any yes/no questions; disable interaction'), + new InputOption('--no', '-n', InputOption::VALUE_NONE, 'Answer "no" to any yes/no questions; disable interaction'), ]); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Activity/ActivityLogCommand.php new/platformsh-cli-3.49.0/src/Command/Activity/ActivityLogCommand.php --- old/platformsh-cli-3.48.1/src/Command/Activity/ActivityLogCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Activity/ActivityLogCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -95,7 +95,7 @@ /** @var ActivityMonitor $monitor */ $monitor = $this->getService('activity_monitor'); if ($refresh > 0 && !$this->runningViaMulti && !$activity->isComplete()) { - $monitor->waitAndLog($activity, null, null, $refresh, $timestamps, $output); + $monitor->waitAndLog($activity, $refresh, $timestamps, false, $output); // Once the activity is complete, something has probably changed in // the project's environments, so this is a good opportunity to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Backup/BackupCreateCommand.php new/platformsh-cli-3.49.0/src/Command/Backup/BackupCreateCommand.php --- old/platformsh-cli-3.48.1/src/Command/Backup/BackupCreateCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Backup/BackupCreateCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -54,8 +54,6 @@ $this->stdErr->writeln("Creating a backup of <info>$environmentId</info>"); if ($this->shouldWait($input)) { - $this->stdErr->writeln('Waiting for the backup to complete...'); - // Strongly recommend using --no-wait in a cron job. if (!$this->isTerminal(STDIN)) { $this->stdErr->writeln( @@ -65,11 +63,7 @@ /** @var \Platformsh\Cli\Service\ActivityMonitor $activityMonitor */ $activityMonitor = $this->getService('activity_monitor'); - $success = $activityMonitor->waitAndLog( - $activity, - 'A backup of environment <info>' . $environmentId . '</info> has been created', - 'The backup failed' - ); + $success = $activityMonitor->waitAndLog($activity); if (!$success) { return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Backup/BackupRestoreCommand.php new/platformsh-cli-3.49.0/src/Command/Backup/BackupRestoreCommand.php --- old/platformsh-cli-3.48.1/src/Command/Backup/BackupRestoreCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Backup/BackupRestoreCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -116,14 +116,9 @@ $activity = $selectedActivity->restore($target, $branchFrom); if ($this->shouldWait($input)) { - $this->stdErr->writeln('Waiting for the restore to complete...'); /** @var \Platformsh\Cli\Service\ActivityMonitor $activityMonitor */ $activityMonitor = $this->getService('activity_monitor'); - $success = $activityMonitor->waitAndLog( - $activity, - 'The backup was successfully restored', - 'Restoring failed' - ); + $success = $activityMonitor->waitAndLog($activity); if (!$success) { return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Commit/CommitGetCommand.php new/platformsh-cli-3.49.0/src/Command/Commit/CommitGetCommand.php --- old/platformsh-cli-3.48.1/src/Command/Commit/CommitGetCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Commit/CommitGetCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -5,7 +5,6 @@ use Platformsh\Cli\Command\CommandBase; use Platformsh\Cli\Service\GitDataApi; use Platformsh\Cli\Service\PropertyFormatter; -use Platformsh\Cli\Service\Table; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -28,9 +27,13 @@ $this->addEnvironmentOption(); $definition = $this->getDefinition(); - Table::configureInput($definition); PropertyFormatter::configureInput($definition); + // Deprecated options, left for backwards compatibility + $this->addOption('format', null, InputOption::VALUE_REQUIRED, 'DEPRECATED'); + $this->addOption('columns', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'DEPRECATED'); + $this->addOption('no-header', null, InputOption::VALUE_NONE, 'DEPRECATED'); + $this->addExample('Display the current commit on the environment'); $this->addExample('Display the previous commit', 'HEAD~'); $this->addExample('Display the 3rd commit before the current one', 'HEAD~3'); @@ -42,6 +45,7 @@ */ protected function execute(InputInterface $input, OutputInterface $output) { + $this->warnAboutDeprecatedOptions(['columns', 'format', 'no-header']); $this->validateInput($input, false, true); $commitSha = $input->getArgument('commit'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Commit/CommitListCommand.php new/platformsh-cli-3.49.0/src/Command/Commit/CommitListCommand.php --- old/platformsh-cli-3.48.1/src/Command/Commit/CommitListCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Commit/CommitListCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -86,7 +86,7 @@ $formatter->format($commit->author['date'], 'author.date'), ['wrap' => false] ); - $row[] = new AdaptiveTableCell($commit->sha, ['wrap' => false]); + $row[] = $commit->sha; $row[] = $commit->author['name']; $row[] = $this->summarize($commit->message); $rows[] = $row; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Db/DbSqlCommand.php new/platformsh-cli-3.49.0/src/Command/Db/DbSqlCommand.php --- old/platformsh-cli-3.48.1/src/Command/Db/DbSqlCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Db/DbSqlCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -23,7 +23,7 @@ ->setDescription('Run SQL on the remote database') ->addArgument('query', InputArgument::OPTIONAL, 'An SQL statement to execute') ->addOption('raw', null, InputOption::VALUE_NONE, 'Produce raw, non-tabular output'); - $this->addOption('schema', null, InputOption::VALUE_REQUIRED, 'The schema to dump. Omit to use the default schema (usually "main"). Pass an empty string to not use any schema.'); + $this->addOption('schema', null, InputOption::VALUE_REQUIRED, 'The schema to use. Omit to use the default schema (usually "main"). Pass an empty string to not use any schema.'); $this->addProjectOption()->addEnvironmentOption()->addAppOption(); Relationships::configureInput($this->getDefinition()); Ssh::configureInput($this->getDefinition()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/DecodeCommand.php new/platformsh-cli-3.49.0/src/Command/DecodeCommand.php --- old/platformsh-cli-3.48.1/src/Command/DecodeCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/DecodeCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -54,10 +54,6 @@ return 1; } - if ($decoded === [] && $b64decoded === '{}') { - $decoded = new \stdClass(); - } - if ($property = $input->getOption('property')) { if (is_scalar($decoded)) { $this->stdErr->writeln('The --property option cannot be used with a scalar value.'); @@ -79,6 +75,10 @@ } } } else { + if ($decoded === [] && $b64decoded === '{}') { + $decoded = new \stdClass(); + } + $value = $decoded; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Environment/EnvironmentBranchCommand.php new/platformsh-cli-3.49.0/src/Command/Environment/EnvironmentBranchCommand.php --- old/platformsh-cli-3.48.1/src/Command/Environment/EnvironmentBranchCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Environment/EnvironmentBranchCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -169,11 +169,7 @@ if ($this->shouldWait($input)) { /** @var \Platformsh\Cli\Service\ActivityMonitor $activityMonitor */ $activityMonitor = $this->getService('activity_monitor'); - $remoteSuccess = $activityMonitor->waitAndLog( - $activity, - "The environment <info>$branchName</info> has been created.", - '<error>Branching failed</error>' - ); + $remoteSuccess = $activityMonitor->waitAndLog($activity); // If a new local branch has been created, set it to track the // remote branch. This requires first fetching the new branch from diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Environment/EnvironmentMergeCommand.php new/platformsh-cli-3.49.0/src/Command/Environment/EnvironmentMergeCommand.php --- old/platformsh-cli-3.48.1/src/Command/Environment/EnvironmentMergeCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Environment/EnvironmentMergeCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -72,11 +72,7 @@ if ($this->shouldWait($input)) { /** @var \Platformsh\Cli\Service\ActivityMonitor $activityMonitor */ $activityMonitor = $this->getService('activity_monitor'); - $success = $activityMonitor->waitAndLog( - $activity, - 'Merge complete', - 'Merge failed' - ); + $success = $activityMonitor->waitAndLog($activity); if (!$success) { return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Environment/EnvironmentPushCommand.php new/platformsh-cli-3.49.0/src/Command/Environment/EnvironmentPushCommand.php --- old/platformsh-cli-3.48.1/src/Command/Environment/EnvironmentPushCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Environment/EnvironmentPushCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -26,8 +26,8 @@ ->addOption('force', 'f', InputOption::VALUE_NONE, 'Allow non-fast-forward updates') ->addOption('force-with-lease', null, InputOption::VALUE_NONE, 'Allow non-fast-forward updates, if the remote-tracking branch is up to date') ->addOption('set-upstream', 'u', InputOption::VALUE_NONE, 'Set the target environment as the upstream for the source branch') - ->addOption('branch', null, InputOption::VALUE_NONE, 'Create the environment as a branch') - ->addOption('activate', null, InputOption::VALUE_NONE, 'Activate the environment after pushing') + ->addOption('activate', null, InputOption::VALUE_NONE, 'Activate the environment before pushing') + ->addOption('branch', null, InputOption::VALUE_NONE, 'DEPRECATED: alias of --activate') ->addOption('parent', null, InputOption::VALUE_REQUIRED, 'Set a new environment parent (only used with --activate or --branch)'); $this->addWaitOptions(); $this->addProjectOption() @@ -36,13 +36,15 @@ $this->addExample('Push code to the current environment'); $this->addExample('Push code, without waiting for deployment', '--no-wait'); $this->addExample( - 'Push code and activate the environment as a child of \'develop\'', + 'Push code, first branching or activating the environment as a child of \'develop\'', '--activate --parent develop' ); } protected function execute(InputInterface $input, OutputInterface $output) { + $this->warnAboutDeprecatedOptions(['branch'], 'The option %s is deprecated and will be removed in future. Use --activate, which has the same effect.'); + $this->validateInput($input, true); $projectRoot = $this->getProjectRoot(); if (!$projectRoot) { @@ -95,67 +97,33 @@ // Determine whether the target environment is new. $project = $this->getSelectedProject(); $targetEnvironment = $this->api()->getEnvironment($target, $project); - $this->stdErr->writeln(sprintf( - 'Pushing <info>%s</info> to the %s environment <info>%s</info>', - $source, - $targetEnvironment ? 'existing' : 'new', - $target - )); - $activate = false; - $createAsBranch = false; - $parentId = null; + $activities = []; if ($target !== 'master') { - // Determine whether to create the environment as a branch. - if (!$targetEnvironment) { - $createAsBranch = $input->getOption('branch') - || ($input->isInteractive() && $questionHelper->confirm(sprintf( - 'Create <info>%s</info> as an active branch?', - $target - ))); - } - - // Determine whether to activate the environment after pushing. - if (!$targetEnvironment || ($targetEnvironment && $targetEnvironment->status === 'inactive')) { - $activate = $input->getOption('activate') - || ($input->isInteractive() && $questionHelper->confirm(sprintf( - 'Activate <info>%s</info> after pushing?', - $target - ))); + // Determine whether to activate the environment. + $activate = false; + if (!$targetEnvironment || $targetEnvironment->status === 'inactive') { + $activate = $input->getOption('branch') + || $input->getOption('activate'); + if (!$activate && $input->isInteractive()) { + $questionText = $targetEnvironment + ? sprintf('Do you want to activate the target environment %s?', $this->api()->getEnvironmentLabel($targetEnvironment)) + : sprintf('Create <info>%s</info> as an active environment?', $target); + $activate = $questionHelper->confirm($questionText); + } } - // If activating, determine what the environment's parent should be. - if ($activate || $createAsBranch) { + if ($activate) { + // If activating, determine what the environment's parent should be. $parentId = $input->getOption('parent') ?: $this->findTargetParent($project, $targetEnvironment ?: null); - } - - if ($createAsBranch) { - $parentEnvironment = $this->api()->getEnvironment($parentId, $project); - if (!$parentEnvironment) { - throw new \RuntimeException("Parent environment not found: $parentId"); - } - if (!$parentEnvironment->operationAvailable('branch', true)) { - $this->stdErr->writeln(sprintf( - 'Operation not available: the environment %s cannot be branched.', - $this->api()->getEnvironmentLabel($parentEnvironment, 'error') - )); - - if ($parentEnvironment->is_dirty) { - $this->stdErr->writeln('An activity is currently pending or in progress on the environment.'); - } elseif (!$parentEnvironment->isActive()) { - $this->stdErr->writeln('The environment is not active.'); - } + // Activate the target environment. The deployment activity + // will queue up behind whatever other activities are created + // here. + $activities = $this->activateTarget($target, $parentId, $project); + if ($activities === false) { return 1; } - - $activity = $parentEnvironment->branch($target, $target); - $this->stdErr->writeln(sprintf( - 'Branched <info>%s</info> from parent %s', - $target, - $this->api()->getEnvironmentLabel($parentEnvironment) - )); - $this->debug(sprintf('Branch activity ID / state: %s / %s', $activity->id, $activity->state)); } } @@ -188,11 +156,27 @@ $git->setSshCommand($ssh->getSshCommand($extraSshOptions)); // Push. + $this->stdErr->writeln(sprintf( + 'Pushing <info>%s</info> to the %s environment <info>%s</info>', + $source, + $targetEnvironment ? 'existing' : 'new', + $target + )); $success = $git->execute($gitArgs, null, false, false, $env); if (!$success) { return 1; } + // Wait if there are still activities. + if ($this->shouldWait($input) && !empty($activities)) { + /** @var \Platformsh\Cli\Service\ActivityMonitor $monitor */ + $monitor = $this->getService('activity_monitor'); + $success = $monitor->waitMultiple($activities, $project); + if (!$success) { + return 1; + } + } + // Clear some caches after pushing. $this->api()->clearEnvironmentsCache($project->id); if ($this->hasSelectedEnvironment()) { @@ -206,19 +190,70 @@ } } - if ($activate) { - $args = [ - '--project' => $project->getUri(), - '--environment' => $target, - '--parent' => $parentId, - '--yes' => true, - '--no-wait' => $input->getOption('no-wait'), - ]; + return 0; + } - return $this->runOtherCommand('environment:activate', $args); + /** + * Branches the target environment or activates it with the given parent. + * + * @param string $target + * @param string $parentId + * @param Project $project + * + * @return false|array A list of activities, or false on failure. + */ + private function activateTarget($target, $parentId, Project $project) { + $parentEnvironment = $this->api()->getEnvironment($parentId, $project); + if (!$parentEnvironment) { + throw new \RuntimeException("Parent environment not found: $parentId"); } - return 0; + $targetEnvironment = $this->api()->getEnvironment($target, $project); + if ($targetEnvironment) { + $activities = []; + if ($targetEnvironment->parent !== $parentId) { + $activities = array_merge( + $activities, + $targetEnvironment->update(['parent' => $parentId])->getActivities() + ); + } + $activities[] = $targetEnvironment->activate(); + $this->stdErr->writeln(sprintf( + 'Activated environment <info>%s</info>', + $this->api()->getEnvironmentLabel($targetEnvironment) + )); + $this->api()->clearEnvironmentsCache($project->id); + + return $activities; + } + + // For new environments, use branch() to create them as active in the first place. + if (!$parentEnvironment->operationAvailable('branch', true)) { + $this->stdErr->writeln(sprintf( + 'Operation not available: the environment %s cannot be branched.', + $this->api()->getEnvironmentLabel($parentEnvironment, 'error') + )); + + if ($parentEnvironment->is_dirty) { + $this->stdErr->writeln('An activity is currently pending or in progress on the environment.'); + } elseif (!$parentEnvironment->isActive()) { + $this->stdErr->writeln('The environment is not active.'); + } + + return false; + } + + $activity = $parentEnvironment->branch($target, $target); + $this->stdErr->writeln(sprintf( + 'Branched <info>%s</info> from parent %s', + $target, + $this->api()->getEnvironmentLabel($parentEnvironment) + )); + $this->debug(sprintf('Branch activity ID / state: %s / %s', $activity->id, $activity->state)); + + $this->api()->clearEnvironmentsCache($project->id); + + return [$activity]; } /** @@ -230,10 +265,12 @@ * @return string The parent environment ID. */ private function findTargetParent(Project $project, Environment $targetEnvironment = null) { - $environments = $this->api()->getEnvironments($project); if ($targetEnvironment && $targetEnvironment->parent) { - $defaultId = $targetEnvironment->parent; - } elseif ($this->hasSelectedEnvironment()) { + return $targetEnvironment->parent; + } + + $environments = $this->api()->getEnvironments($project); + if ($this->hasSelectedEnvironment()) { $defaultId = $this->getSelectedEnvironment()->id; } else { $defaultId = $this->api()->getDefaultEnvironmentId($environments); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Environment/EnvironmentRelationshipsCommand.php new/platformsh-cli-3.49.0/src/Command/Environment/EnvironmentRelationshipsCommand.php --- old/platformsh-cli-3.48.1/src/Command/Environment/EnvironmentRelationshipsCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Environment/EnvironmentRelationshipsCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -1,8 +1,6 @@ <?php namespace Platformsh\Cli\Command\Environment; -use GuzzleHttp\Query; -use GuzzleHttp\Url; use Platformsh\Cli\Command\CommandBase; use Platformsh\Cli\Service\Ssh; use Symfony\Component\Console\Input\InputArgument; @@ -44,7 +42,7 @@ foreach ($relationships as $name => $relationship) { foreach ($relationship as $index => $instance) { if (!isset($instance['url'])) { - $relationships[$name][$index]['url'] = $this->buildUrl($instance); + $relationships[$name][$index]['url'] = $relationshipsService->buildUrl($instance); } } } @@ -55,26 +53,4 @@ return 0; } - - /** - * Builds a URL from the parts included in a relationship array. - * - * @param array $instance - * - * @return string - */ - private function buildUrl(array $instance) - { - $parts = $instance; - // Convert to parse_url parts. - $parts['user'] = $parts['username']; - $parts['pass'] = $parts['password']; - unset($parts['username'], $parts['password']); - // The 'query' is expected to be a string. - if (is_array($parts['query'])) { - $parts['query'] = (new Query($parts['query']))->__toString(); - } - - return Url::buildUrl($parts); - } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Environment/EnvironmentSynchronizeCommand.php new/platformsh-cli-3.49.0/src/Command/Environment/EnvironmentSynchronizeCommand.php --- old/platformsh-cli-3.48.1/src/Command/Environment/EnvironmentSynchronizeCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Environment/EnvironmentSynchronizeCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -128,11 +128,7 @@ if ($this->shouldWait($input)) { /** @var \Platformsh\Cli\Service\ActivityMonitor $activityMonitor */ $activityMonitor = $this->getService('activity_monitor'); - $success = $activityMonitor->waitAndLog( - $activity, - "Synchronization complete", - "Synchronization failed" - ); + $success = $activityMonitor->waitAndLog($activity); if (!$success) { return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Integration/IntegrationListCommand.php new/platformsh-cli-3.49.0/src/Command/Integration/IntegrationListCommand.php --- old/platformsh-cli-3.48.1/src/Command/Integration/IntegrationListCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Integration/IntegrationListCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -49,12 +49,14 @@ $table->render($rows, $header); - $executable = $this->config()->get('application.executable'); - $this->stdErr->writeln(''); - $this->stdErr->writeln('View integration details with: <info>' . $executable . ' integration:get [id]</info>'); - $this->stdErr->writeln(''); - $this->stdErr->writeln('Add a new integration with: <info>' . $executable . ' integration:add</info>'); - $this->stdErr->writeln('Delete an integration with: <info>' . $executable . ' integration:delete [id]</info>'); + if (!$table->formatIsMachineReadable()) { + $executable = $this->config()->get('application.executable'); + $this->stdErr->writeln(''); + $this->stdErr->writeln('View integration details with: <info>' . $executable . ' integration:get [id]</info>'); + $this->stdErr->writeln(''); + $this->stdErr->writeln('Add a new integration with: <info>' . $executable . ' integration:add</info>'); + $this->stdErr->writeln('Delete an integration with: <info>' . $executable . ' integration:delete [id]</info>'); + } return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Mount/MountDownloadCommand.php new/platformsh-cli-3.49.0/src/Command/Mount/MountDownloadCommand.php --- old/platformsh-cli-3.48.1/src/Command/Mount/MountDownloadCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Mount/MountDownloadCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -44,16 +44,15 @@ /** @var App $container */ $container = $this->selectRemoteContainer($input); - $mounts = $container->getMounts(); + /** @var \Platformsh\Cli\Service\Mount $mountService */ + $mountService = $this->getService('mount'); + $mounts = $mountService->mountsFromConfig($container->getConfig()); if (empty($mounts)) { - $this->stdErr->writeln(sprintf('The %s "%s" doesn\'t define any mounts.', $container->getType(), $container->getName())); + $this->stdErr->writeln(sprintf('No mounts found on host: <info>%s</info>', $container->getSshUrl())); return 1; } - /** @var \Platformsh\Cli\Service\Mount $mountService */ - $mountService = $this->getService('mount'); - $mounts = $mountService->normalizeMounts($mounts); /** @var \Platformsh\Cli\Service\QuestionHelper $questionHelper */ $questionHelper = $this->getService('question_helper'); @@ -208,7 +207,8 @@ return $appPath . '/' . $mountPath; } - $sharedMounts = $mountService->getSharedFileMounts($app->getMounts()); + $mounts = $mountService->mountsFromConfig($app->getConfig()); + $sharedMounts = $mountService->getSharedFileMounts($mounts); if (isset($sharedMounts[$mountPath])) { $sharedDir = $this->getSharedDir($app); if ($sharedDir !== null && file_exists($sharedDir . '/' . $sharedMounts[$mountPath])) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Mount/MountListCommand.php new/platformsh-cli-3.49.0/src/Command/Mount/MountListCommand.php --- old/platformsh-cli-3.48.1/src/Command/Mount/MountListCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Mount/MountListCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -3,6 +3,8 @@ namespace Platformsh\Cli\Command\Mount; use Platformsh\Cli\Command\CommandBase; +use Platformsh\Cli\Model\AppConfig; +use Platformsh\Cli\Model\Host\LocalHost; use Platformsh\Cli\Service\Table; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -33,21 +35,25 @@ */ protected function execute(InputInterface $input, OutputInterface $output) { - $this->validateInput($input); - - $container = $this->selectRemoteContainer($input); - $mounts = $container->getMounts(); + $host = $this->selectHost($input, getenv($this->config()->get('service.env_prefix') . 'APPLICATION')); + /** @var \Platformsh\Cli\Service\Mount $mountService */ + $mountService = $this->getService('mount'); + if ($host instanceof LocalHost) { + /** @var \Platformsh\Cli\Service\RemoteEnvVars $envVars */ + $envVars = $this->getService('remote_env_vars'); + $config = (new AppConfig($envVars->getArrayEnvVar('APPLICATION', $host))); + $mounts = $mountService->mountsFromConfig($config); + } else { + $container = $this->selectRemoteContainer($input); + $mounts = $mountService->mountsFromConfig($container->getConfig()); + } if (empty($mounts)) { - $this->stdErr->writeln(sprintf('The %s "%s" doesn\'t define any mounts.', $container->getType(), $container->getName())); + $this->stdErr->writeln(sprintf('No mounts found on host: <info>%s</info>', $host->getLabel())); return 1; } - /** @var \Platformsh\Cli\Service\Mount $mountService */ - $mountService = $this->getService('mount'); - $mounts = $mountService->normalizeMounts($mounts); - if ($input->getOption('paths')) { $output->writeln(array_keys($mounts)); @@ -64,12 +70,7 @@ /** @var \Platformsh\Cli\Service\Table $table */ $table = $this->getService('table'); - $this->stdErr->writeln(sprintf( - 'Mounts in the %s <info>%s</info> (environment <info>%s</info>):', - $container->getType(), - $container->getName(), - $this->getSelectedEnvironment()->id - )); + $this->stdErr->writeln(sprintf('Mounts on <info>%s</info>:', $host->getLabel())); $table->render($rows, $header); return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Mount/MountSizeCommand.php new/platformsh-cli-3.49.0/src/Command/Mount/MountSizeCommand.php --- old/platformsh-cli-3.48.1/src/Command/Mount/MountSizeCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Mount/MountSizeCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -3,6 +3,8 @@ namespace Platformsh\Cli\Command\Mount; use Platformsh\Cli\Command\CommandBase; +use Platformsh\Cli\Model\AppConfig; +use Platformsh\Cli\Model\Host\LocalHost; use Platformsh\Cli\Service\Ssh; use Platformsh\Cli\Service\Table; use Symfony\Component\Console\Helper\Helper; @@ -45,18 +47,26 @@ */ protected function execute(InputInterface $input, OutputInterface $output) { - $this->validateInput($input); - - $container = $this->selectRemoteContainer($input); - $mounts = $container->getMounts(); + $host = $this->selectHost($input, getenv($this->config()->get('service.env_prefix') . 'APPLICATION')); + /** @var \Platformsh\Cli\Service\Mount $mountService */ + $mountService = $this->getService('mount'); + if ($host instanceof LocalHost) { + /** @var \Platformsh\Cli\Service\RemoteEnvVars $envVars */ + $envVars = $this->getService('remote_env_vars'); + $config = (new AppConfig($envVars->getArrayEnvVar('APPLICATION', $host))); + $mounts = $mountService->mountsFromConfig($config); + } else { + $container = $this->selectRemoteContainer($input); + $mounts = $mountService->mountsFromConfig($container->getConfig()); + } if (empty($mounts)) { - $this->stdErr->writeln(sprintf('The %s "%s" doesn\'t define any mounts.', $container->getType(), $container->getName())); + $this->stdErr->writeln(sprintf('No mounts found on host: <info>%s</info>', $host->getLabel())); return 1; } - $this->stdErr->writeln(sprintf('Checking disk usage for all mounts of the %s <info>%s</info>...', $container->getType(), $container->getName())); + $this->stdErr->writeln(sprintf('Checking disk usage for all mounts on <info>%s</info>...', $host->getLabel())); $this->stdErr->writeln(''); // Get a list of the mount paths (and normalize them as relative paths, @@ -78,7 +88,12 @@ $commands = []; $commands[] = 'echo "$' . $appDirVar . '"'; $commands[] = 'echo'; - $commands[] = 'df -P -B1 -a -x squashfs -x tmpfs -x sysfs -x proc -x devpts -x rpc_pipefs'; + + // The 'df' command uses '-x' to exclude a bunch of irrelevant + // filesystem types. Currently mounts appear to use 'ext4', but that + // may not always be the case. + $commands[] = 'df -P -B1 -a -x squashfs -x tmpfs -x sysfs -x proc -x devpts -x rpc_pipefs -x cgroup -x fake-sysfs'; + $commands[] = 'echo'; $commands[] = 'cd "$' . $appDirVar . '"'; @@ -88,16 +103,7 @@ $command = 'set -e; ' . implode('; ', $commands); // Connect to the application via SSH and run the commands. - $sshArgs = [ - 'ssh', - $container->getSshUrl(), - ]; - /** @var \Platformsh\Cli\Service\Ssh $ssh */ - $ssh = $this->getService('ssh'); - $sshArgs = array_merge($sshArgs, $ssh->getSshArgs()); - /** @var \Platformsh\Cli\Service\Shell $shell */ - $shell = $this->getService('shell'); - $result = $shell->execute(array_merge($sshArgs, [$command]), null, true); + $result = $host->runCommand($command); // Separate the commands' output. list($appDir, $dfOutput, $duOutput) = explode("\n\n", $result, 3); @@ -173,11 +179,11 @@ private function getDfColumn($line, $columnName) { $columnPatterns = [ - 'filesystem' => '#^(.+?)(\s+[0-9])#', - 'total' => '#([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+%\s+#', - 'used' => '#([0-9]+)\s+[0-9]+\s+[0-9]+%\s+#', - 'available' => '#([0-9]+)\s+[0-9]+%\s+#', - 'path' => '#%\s+(/.+)$#', + 'filesystem' => '/^(.+?)(\s+[0-9])/', + 'total' => '/([0-9]+)\s+[0-9]+\s+[0-9]+\s+([0-9]+%|-)\s+/', + 'used' => '/([0-9]+)\s+[0-9]+\s+([0-9]+%|-)\s+/', + 'available' => '/([0-9]+)\s+([0-9]+%|-)\s+/', + 'path' => '/\s(?:[0-9]+%|-)\s+(\/.+)$/', ]; if (!isset($columnPatterns[$columnName])) { throw new \InvalidArgumentException("Invalid df column: $columnName"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Mount/MountUploadCommand.php new/platformsh-cli-3.49.0/src/Command/Mount/MountUploadCommand.php --- old/platformsh-cli-3.48.1/src/Command/Mount/MountUploadCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Mount/MountUploadCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -40,16 +40,15 @@ $this->validateInput($input); $container = $this->selectRemoteContainer($input); - $mounts = $container->getMounts(); + /** @var \Platformsh\Cli\Service\Mount $mountService */ + $mountService = $this->getService('mount'); + $mounts = $mountService->mountsFromConfig($container->getConfig()); if (empty($mounts)) { - $this->stdErr->writeln(sprintf('The %s "%s" doesn\'t define any mounts.', $container->getType(), $container->getName())); + $this->stdErr->writeln(sprintf('No mounts found on host: <info>%s</info>', $container->getSshUrl())); return 1; } - /** @var \Platformsh\Cli\Service\Mount $mountService */ - $mountService = $this->getService('mount'); - $mounts = $mountService->normalizeMounts($mounts); /** @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.48.1/src/Command/Project/Variable/ProjectVariableDeleteCommand.php new/platformsh-cli-3.49.0/src/Command/Project/Variable/ProjectVariableDeleteCommand.php --- old/platformsh-cli-3.48.1/src/Command/Project/Variable/ProjectVariableDeleteCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Project/Variable/ProjectVariableDeleteCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -12,6 +12,7 @@ class ProjectVariableDeleteCommand extends CommandBase { protected $hiddenInList = true; + protected $stability = 'deprecated'; /** * {@inheritdoc} @@ -22,9 +23,12 @@ ->setName('project:variable:delete') ->addArgument('name', InputArgument::REQUIRED, 'The variable name') ->setDescription('Delete a variable from a project'); + $this->setHelp( + 'This command is deprecated and will be removed in a future version.' + . "\nInstead, use: <info>variable:delete --level project [variable]</info>" + ); $this->addProjectOption() ->addWaitOptions(); - $this->addExample('Delete the variable "example"', 'example'); } protected function execute(InputInterface $input, OutputInterface $output) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Project/Variable/ProjectVariableGetCommand.php new/platformsh-cli-3.49.0/src/Command/Project/Variable/ProjectVariableGetCommand.php --- old/platformsh-cli-3.48.1/src/Command/Project/Variable/ProjectVariableGetCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Project/Variable/ProjectVariableGetCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -14,6 +14,7 @@ class ProjectVariableGetCommand extends CommandBase { protected $hiddenInList = true; + protected $stability = 'deprecated'; /** * {@inheritdoc} @@ -26,9 +27,12 @@ ->addArgument('name', InputArgument::OPTIONAL, 'The name of the variable') ->addOption('pipe', null, InputOption::VALUE_NONE, 'Output the full variable value only (a "name" must be specified)') ->setDescription('View variable(s) for a project'); + $this->setHelp( + 'This command is deprecated and will be removed in a future version.' + . "\nInstead, use <info>variable:list</info> and <info>variable:get</info>" + ); Table::configureInput($this->getDefinition()); $this->addProjectOption(); - $this->addExample('View the variable "example"', 'example'); $this->setHiddenAliases(['project:variable:list']); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Project/Variable/ProjectVariableSetCommand.php new/platformsh-cli-3.49.0/src/Command/Project/Variable/ProjectVariableSetCommand.php --- old/platformsh-cli-3.48.1/src/Command/Project/Variable/ProjectVariableSetCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Project/Variable/ProjectVariableSetCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -13,6 +13,7 @@ class ProjectVariableSetCommand extends CommandBase { protected $hiddenInList = true; + protected $stability = 'deprecated'; /** * {@inheritdoc} @@ -28,12 +29,12 @@ ->addOption('no-visible-build', null, InputOption::VALUE_NONE, 'Do not expose this variable at build time') ->addOption('no-visible-runtime', null, InputOption::VALUE_NONE, 'Do not expose this variable at runtime') ->setDescription('Set a variable for a project'); + $this->setHelp( + 'This command is deprecated and will be removed in a future version.' + . "\nInstead, use <info>variable:create</info> and <info>variable:update</info>" + ); $this->addProjectOption() ->addWaitOptions(); - $this->addExample('Set the variable "example" to the string "123"', 'example 123'); - $this->addExample('Set the variable "example" to the Boolean TRUE', 'example --json true'); - $this->addExample('Set the variable "example" to a list of values', 'example --json \'["value1", "value2"]\''); - $this->addExample('Set the variable "example" to the string "abc", but only at build time', 'example abc --no-visible-runtime'); } protected function execute(InputInterface $input, OutputInterface $output) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Tunnel/TunnelSingleCommand.php new/platformsh-cli-3.49.0/src/Command/Tunnel/TunnelSingleCommand.php --- old/platformsh-cli-3.48.1/src/Command/Tunnel/TunnelSingleCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Tunnel/TunnelSingleCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -1,7 +1,6 @@ <?php namespace Platformsh\Cli\Command\Tunnel; -use GuzzleHttp\Url; use Platformsh\Cli\Service\Relationships; use Platformsh\Cli\Service\Ssh; use Platformsh\Cli\Console\ProcessManager; @@ -170,7 +169,7 @@ $this->stdErr->writeln(''); if (isset($localService['scheme']) && in_array($localService['scheme'], ['http', 'https'], true)) { - $this->stdErr->writeln(sprintf('URL: <info>%s</info>', $this->getServiceUrl($localService))); + $this->stdErr->writeln(sprintf('URL: <info>%s</info>', $relationshipsService->buildUrl($localService))); $this->stdErr->writeln(''); } @@ -182,23 +181,4 @@ return $process->isSuccessful() ? 0 : 1; } - - /** - * Build a URL to a service. - * - * @param array $service - * - * @return string - */ - private function getServiceUrl(array $service) - { - $map = ['username' => 'user', 'password' => 'pass']; - $urlParts = []; - foreach ($service as $key => $value) { - $newKey = isset($map[$key]) ? $map[$key] : $key; - $urlParts[$newKey] = $value; - } - - return Url::buildUrl($urlParts); - } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Variable/VariableDisableCommand.php new/platformsh-cli-3.49.0/src/Command/Variable/VariableDisableCommand.php --- old/platformsh-cli-3.48.1/src/Command/Variable/VariableDisableCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Variable/VariableDisableCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -12,6 +12,7 @@ class VariableDisableCommand extends CommandBase { protected $hiddenInList = true; + protected $stability = 'deprecated'; /** * {@inheritdoc} @@ -22,6 +23,10 @@ ->setName('variable:disable') ->addArgument('name', InputArgument::REQUIRED, 'The name of the variable') ->setDescription('Disable an enabled environment-level variable'); + $this->setHelp( + 'This command is deprecated and will be removed in a future version.' + . "\nInstead, use: <info>variable:update --enabled false [variable]</info>" + ); $this->addProjectOption() ->addEnvironmentOption() ->addWaitOptions(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Variable/VariableEnableCommand.php new/platformsh-cli-3.49.0/src/Command/Variable/VariableEnableCommand.php --- old/platformsh-cli-3.48.1/src/Command/Variable/VariableEnableCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Variable/VariableEnableCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -12,6 +12,7 @@ class VariableEnableCommand extends CommandBase { protected $hiddenInList = true; + protected $stability = 'deprecated'; /** * {@inheritdoc} @@ -22,6 +23,10 @@ ->setName('variable:enable') ->addArgument('name', InputArgument::REQUIRED, 'The name of the variable') ->setDescription('Enable a disabled environment-level variable'); + $this->setHelp( + 'This command is deprecated and will be removed in a future version.' + . "\nInstead, use: <info>variable:update --enabled false [variable]</info>" + ); $this->addProjectOption() ->addEnvironmentOption() ->addWaitOptions(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/Variable/VariableSetCommand.php new/platformsh-cli-3.49.0/src/Command/Variable/VariableSetCommand.php --- old/platformsh-cli-3.48.1/src/Command/Variable/VariableSetCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/Variable/VariableSetCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -14,6 +14,7 @@ class VariableSetCommand extends CommandBase { protected $hiddenInList = true; + protected $stability = 'deprecated'; /** * {@inheritdoc} @@ -31,9 +32,10 @@ $this->addProjectOption() ->addEnvironmentOption() ->addWaitOptions(); - $this->addExample('Set the variable "example" to the string "123"', 'example 123'); - $this->addExample('Set the variable "example" to the Boolean TRUE', 'example --json true'); - $this->addExample('Set the variable "example" to a list of values', 'example --json \'["value1", "value2"]\''); + $this->setHelp( + 'This command is deprecated and will be removed in a future version.' + . "\nInstead, use <info>variable:create</info> and <info>variable:update</info>" + ); } protected function execute(InputInterface $input, OutputInterface $output) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Command/WelcomeCommand.php new/platformsh-cli-3.49.0/src/Command/WelcomeCommand.php --- old/platformsh-cli-3.48.1/src/Command/WelcomeCommand.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Command/WelcomeCommand.php 2019-10-08 19:57:59.000000000 +0200 @@ -138,6 +138,7 @@ $examples = []; if (getenv($envPrefix . 'APPLICATION')) { $examples[] = "To view application config, run: <info>$executable app:config</info>"; + $examples[] = "To view mounts, run: <info>$executable mounts</info>"; } if (getenv($envPrefix . 'RELATIONSHIPS')) { $examples[] = "To view relationships, run: <info>$executable relationships</info>"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Console/EventSubscriber.php new/platformsh-cli-3.49.0/src/Console/EventSubscriber.php --- old/platformsh-cli-3.48.1/src/Console/EventSubscriber.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Console/EventSubscriber.php 2019-10-08 19:57:59.000000000 +0200 @@ -12,7 +12,7 @@ use Platformsh\Cli\Exception\PermissionDeniedException; use Platformsh\Client\Exception\EnvironmentStateException; use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\Console\Event\ConsoleExceptionEvent; +use Symfony\Component\Console\Event\ConsoleErrorEvent; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class EventSubscriber implements EventSubscriberInterface @@ -32,35 +32,35 @@ */ public static function getSubscribedEvents() { - return [ConsoleEvents::EXCEPTION => 'onException']; + return [ConsoleEvents::ERROR => 'onException']; } /** - * React to any console exceptions. + * React to any console errors or exceptions. * - * @param ConsoleExceptionEvent $event + * @param ConsoleErrorEvent $event */ - public function onException(ConsoleExceptionEvent $event) + public function onException(ConsoleErrorEvent $event) { - $exception = $event->getException(); + $error = $event->getError(); // Replace Guzzle connect exceptions with a friendlier message. This // also prevents the user from seeing two exceptions (one direct from // Guzzle, one from RingPHP). - if ($exception instanceof ConnectException && strpos($exception->getMessage(), 'cURL error 6') !== false) { - $request = $exception->getRequest(); - $event->setException(new ConnectionFailedException( + if ($error instanceof ConnectException && strpos($error->getMessage(), 'cURL error 6') !== false) { + $request = $error->getRequest(); + $event->setError(new ConnectionFailedException( "Failed to connect to host: " . $request->getHost() . " \nPlease check your Internet connection.", - $exception + $error )); $event->stopPropagation(); } // Handle Guzzle exceptions, i.e. HTTP 4xx or 5xx errors. - if (($exception instanceof ClientException || $exception instanceof ServerException) - && ($response = $exception->getResponse())) { - $request = $exception->getRequest(); + if (($error instanceof ClientException || $error instanceof ServerException) + && ($response = $error->getResponse())) { + $request = $error->getRequest(); $requestConfig = $request->getConfig(); $json = (array) json_decode($response->getBody()->__toString(), true); @@ -69,35 +69,35 @@ if ($response->getStatusCode() === 400 && isset($json['error_description']) && $json['error_description'] === 'Invalid refresh token') { - $event->setException(new LoginRequiredException( + $event->setError(new LoginRequiredException( 'Invalid refresh token.', $this->config, - $exception + $error )); $event->stopPropagation(); } elseif ($response->getStatusCode() === 401 && $requestConfig['auth'] === 'oauth2') { - $event->setException(new LoginRequiredException( + $event->setError(new LoginRequiredException( 'Unauthorized.', $this->config, - $exception + $error )); $event->stopPropagation(); } elseif ($response->getStatusCode() === 403 && $requestConfig['auth'] === 'oauth2') { - $event->setException(new PermissionDeniedException( + $event->setError(new PermissionDeniedException( "Permission denied. Check your project or environment permissions.", - $exception + $error )); $event->stopPropagation(); } else { - $event->setException(new HttpException(null, $exception)); + $event->setError(new HttpException(null, $error)); $event->stopPropagation(); } } // When an environment is found to be in the wrong state, perhaps our // cache is old - we should invalidate it. - if ($exception instanceof EnvironmentStateException) { - (new Api())->clearEnvironmentsCache($exception->getEnvironment()->project); + if ($error instanceof EnvironmentStateException) { + (new Api())->clearEnvironmentsCache($error->getEnvironment()->project); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Model/RemoteContainer/App.php new/platformsh-cli-3.49.0/src/Model/RemoteContainer/App.php --- old/platformsh-cli-3.48.1/src/Model/RemoteContainer/App.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Model/RemoteContainer/App.php 2019-10-08 19:57:59.000000000 +0200 @@ -39,24 +39,7 @@ /** * {@inheritdoc} */ - public function getType() - { - return 'app'; - } - - /** - * {@inheritdoc} - */ public function getConfig() { return AppConfig::fromWebApp($this->webApp); } - - /** - * {@inheritdoc} - */ - public function getMounts() { - $config = $this->getConfig()->getNormalized(); - - return !empty($config['mounts']) ? $config['mounts'] : []; - } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Model/RemoteContainer/BrokenEnv.php new/platformsh-cli-3.49.0/src/Model/RemoteContainer/BrokenEnv.php --- old/platformsh-cli-3.48.1/src/Model/RemoteContainer/BrokenEnv.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Model/RemoteContainer/BrokenEnv.php 2019-10-08 19:57:59.000000000 +0200 @@ -44,22 +44,7 @@ /** * {@inheritdoc} */ - public function getType() - { - return 'app'; - } - - /** - * {@inheritdoc} - */ public function getConfig() { return new AppConfig(!empty($this->appName) ? ['name' => $this->appName] : []); } - - /** - * {@inheritdoc} - */ - public function getMounts() { - return []; - } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Model/RemoteContainer/RemoteContainerInterface.php new/platformsh-cli-3.49.0/src/Model/RemoteContainer/RemoteContainerInterface.php --- old/platformsh-cli-3.48.1/src/Model/RemoteContainer/RemoteContainerInterface.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Model/RemoteContainer/RemoteContainerInterface.php 2019-10-08 19:57:59.000000000 +0200 @@ -22,27 +22,9 @@ public function getName(); /** - * Returns the type of remote container (a human-readable string). - * - * Example: 'app' or 'worker'. - * - * @return string - */ - public function getType(); - - /** * Gets the container config. * * @return \Platformsh\Cli\Model\AppConfig */ public function getConfig(); - - /** - * Lists file mounts on the container. - * - * @return array - * An associative array of mounts, taken from the configuration in the - * app config file (.platform.app.yaml). - */ - public function getMounts(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Model/RemoteContainer/Worker.php new/platformsh-cli-3.49.0/src/Model/RemoteContainer/Worker.php --- old/platformsh-cli-3.48.1/src/Model/RemoteContainer/Worker.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Model/RemoteContainer/Worker.php 2019-10-08 19:57:59.000000000 +0200 @@ -39,24 +39,7 @@ /** * {@inheritdoc} */ - public function getType() - { - return 'worker'; - } - - /** - * {@inheritdoc} - */ public function getConfig() { return new AppConfig($this->worker->getProperties()); } - - /** - * {@inheritdoc} - */ - public function getMounts() { - $config = $this->getConfig()->getNormalized(); - - return !empty($config['mounts']) ? $config['mounts'] : []; - } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Service/ActivityMonitor.php new/platformsh-cli-3.49.0/src/Service/ActivityMonitor.php --- old/platformsh-cli-3.48.1/src/Service/ActivityMonitor.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Service/ActivityMonitor.php 2019-10-08 19:57:59.000000000 +0200 @@ -66,24 +66,26 @@ * Wait for a single activity to complete, and display the log continuously. * * @param Activity $activity The activity. - * @param string|null $success A message to show on success. - * @param string|null $failure A message to show on failure. * @param int $pollInterval The interval between refreshing the activity (seconds). * @param bool|string $timestamps Whether to display timestamps (or pass in a date format). + * @param bool $context Whether to add a context message. * @param OutputInterface|null $logOutput The output object for log messages (defaults to stderr). * * @return bool True if the activity succeeded, false otherwise. */ - public function waitAndLog(Activity $activity, $success = null, $failure = null, $pollInterval = 3, $timestamps = false, OutputInterface $logOutput = null) + public function waitAndLog(Activity $activity, $pollInterval = 3, $timestamps = false, $context = true, OutputInterface $logOutput = null) { $stdErr = $this->getStdErr(); $logOutput = $logOutput ?: $stdErr; - $stdErr->writeln(sprintf( - 'Waiting for the activity <info>%s</info> (%s):', - $activity->id, - self::getFormattedDescription($activity) - )); + if ($context) { + $stdErr->writeln(sprintf( + 'Waiting for the activity <info>%s</info> (%s):', + $activity->id, + self::getFormattedDescription($activity) + )); + $stdErr->writeln(''); + } // The progress bar will show elapsed time and the activity's state. $bar = $this->newProgressBar($stdErr); @@ -152,11 +154,11 @@ // Display the success or failure messages. switch ($activity['result']) { case Activity::RESULT_SUCCESS: - $stdErr->writeln($success ?: "Activity <info>{$activity->id}</info> succeeded"); + $stdErr->writeln("Activity <info>{$activity->id}</info> succeeded"); return true; case Activity::RESULT_FAILURE: - $stdErr->writeln($failure ?: "Activity <error>{$activity->id}</error> failed"); + $stdErr->writeln("Activity <error>{$activity->id}</error> failed"); return false; } @@ -289,7 +291,7 @@ // which are not contained in this list must be refreshed // individually. $projectActivities = $project->getActivities(0, null, $mostRecentTimestamp ?: null); - foreach ($activities as $activity) { + foreach ($activities as &$activity) { $refreshed = false; foreach ($projectActivities as $projectActivity) { if ($projectActivity->id === $activity->id) { @@ -328,7 +330,7 @@ // If the activity failed, show the complete log. $stdErr->writeln(' Description: ' . $description); $stdErr->writeln(' Log:'); - $stdErr->writeln($this->indent($activity->log)); + $stdErr->writeln($this->indent($this->formatLog($activity->readLog()))); break; } } @@ -358,7 +360,7 @@ */ public static function formatResult($result, $decorate = true) { - $name = isset(self::$stateNames[$result]) ? self::$stateNames[$result] : $result; + $name = isset(self::$resultNames[$result]) ? self::$resultNames[$result] : $result; return $decorate && $result === Activity::RESULT_FAILURE ? '<error>' . $name . '</error>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Service/Api.php new/platformsh-cli-3.49.0/src/Service/Api.php --- old/platformsh-cli-3.48.1/src/Service/Api.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Service/Api.php 2019-10-08 19:57:59.000000000 +0200 @@ -265,7 +265,7 @@ 'http' => [ 'method' => 'GET', 'follow_location' => 0, - 'timeout' => 5, + 'timeout' => 15, 'user_agent' => $this->getUserAgent(), 'header' => [ 'Authorization: Bearer ' . $this->getAccessToken(), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Service/Mount.php new/platformsh-cli-3.49.0/src/Service/Mount.php --- old/platformsh-cli-3.48.1/src/Service/Mount.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Service/Mount.php 2019-10-08 19:57:59.000000000 +0200 @@ -6,6 +6,8 @@ namespace Platformsh\Cli\Service; +use Platformsh\Cli\Model\AppConfig; + class Mount { /** @@ -32,6 +34,24 @@ } /** + * Find mounts in an application's config. + * + * @param AppConfig $appConfig + * + * @return array + * A normalized list of mounts. + */ + public function mountsFromConfig(AppConfig $appConfig) + { + $config = $appConfig->getNormalized(); + if (empty($config['mounts'])) { + return []; + } + + return $this->normalizeMounts($config['mounts']); + } + + /** * Normalize a list of mounts. * * This ensures the mount path does not begin or end with a '/', and that diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/src/Service/Relationships.php new/platformsh-cli-3.49.0/src/Service/Relationships.php --- old/platformsh-cli-3.48.1/src/Service/Relationships.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/src/Service/Relationships.php 2019-10-08 19:57:59.000000000 +0200 @@ -2,6 +2,7 @@ namespace Platformsh\Cli\Service; +use GuzzleHttp\Query; use Platformsh\Cli\Model\Host\HostInterface; use Platformsh\Cli\Model\Host\LocalHost; use Platformsh\Cli\Util\OsUtil; @@ -270,4 +271,26 @@ { return $this->envVarService->getEnvVar('RELATIONSHIPS', new LocalHost()) !== ''; } + + /** + * Builds a URL from the parts included in a relationship array. + * + * @param array $instance + * + * @return string + */ + public function buildUrl(array $instance) + { + $parts = $instance; + // Convert to parse_url parts. + $parts['user'] = $parts['username']; + $parts['pass'] = $parts['password']; + unset($parts['username'], $parts['password']); + // The 'query' is expected to be a string. + if (is_array($parts['query'])) { + $parts['query'] = (new Query($parts['query']))->__toString(); + } + + return \GuzzleHttp\Url::buildUrl($parts); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/platformsh-cli-3.48.1/tests/Command/DecodeTest.php new/platformsh-cli-3.49.0/tests/Command/DecodeTest.php --- old/platformsh-cli-3.48.1/tests/Command/DecodeTest.php 2019-09-25 15:03:55.000000000 +0200 +++ new/platformsh-cli-3.49.0/tests/Command/DecodeTest.php 2019-10-08 19:57:59.000000000 +0200 @@ -40,4 +40,21 @@ ]), "\n") ); } + + public function testDecodeEmptyObject() { + $this->assertEquals( + '{}', + rtrim($this->runCommand([ + 'value' => base64_encode(json_encode(new \stdClass())) + ]), "\n") + ); + + $this->assertEquals( + 'Property not found: nonexistent', + rtrim($this->runCommand([ + 'value' => base64_encode(json_encode(new \stdClass())), + '--property' => 'nonexistent' + ]), "\n") + ); + } } ++++++ 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-09-25 18:34:23.822431623 +0200 +++ new/vendor/autoload.php 2019-10-08 21:02:43.221454830 +0200 @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit05f10ad0f1b923b7e835bf4d88be530b::getLoader(); +return ComposerAutoloaderInit79bf3e92a559cefb76d7c4aacdb1f222::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 2019-09-25 18:34:23.822431623 +0200 +++ new/vendor/composer/autoload_real.php 2019-10-08 21:02:43.221454830 +0200 @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit05f10ad0f1b923b7e835bf4d88be530b +class ComposerAutoloaderInit79bf3e92a559cefb76d7c4aacdb1f222 { private static $loader; @@ -19,15 +19,15 @@ return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit05f10ad0f1b923b7e835bf4d88be530b', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit79bf3e92a559cefb76d7c4aacdb1f222', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit05f10ad0f1b923b7e835bf4d88be530b', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit79bf3e92a559cefb76d7c4aacdb1f222', '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\ComposerStaticInit05f10ad0f1b923b7e835bf4d88be530b::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit79bf3e92a559cefb76d7c4aacdb1f222::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\ComposerStaticInit05f10ad0f1b923b7e835bf4d88be530b::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit79bf3e92a559cefb76d7c4aacdb1f222::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire05f10ad0f1b923b7e835bf4d88be530b($fileIdentifier, $file); + composerRequire79bf3e92a559cefb76d7c4aacdb1f222($fileIdentifier, $file); } return $loader; } } -function composerRequire05f10ad0f1b923b7e835bf4d88be530b($fileIdentifier, $file) +function composerRequire79bf3e92a559cefb76d7c4aacdb1f222($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-09-25 18:34:23.822431623 +0200 +++ new/vendor/composer/autoload_static.php 2019-10-08 21:02:43.221454830 +0200 @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit05f10ad0f1b923b7e835bf4d88be530b +class ComposerStaticInit79bf3e92a559cefb76d7c4aacdb1f222 { 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 = ComposerStaticInit05f10ad0f1b923b7e835bf4d88be530b::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit05f10ad0f1b923b7e835bf4d88be530b::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit05f10ad0f1b923b7e835bf4d88be530b::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit79bf3e92a559cefb76d7c4aacdb1f222::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit79bf3e92a559cefb76d7c4aacdb1f222::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit79bf3e92a559cefb76d7c4aacdb1f222::$classMap; }, null, ClassLoader::class); }
