From b98f592ff03b5ebb9d48e69f36c1c350713c581f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:59:59 +0000 Subject: [PATCH 1/6] Bump the dependencies group with 4 updates (#1783) Bumps the dependencies group with 4 updates: [psr/log](https://github.com/php-fig/log), [phpro/grumphp](https://github.com/phpro/grumphp), [phpstan/extension-installer](https://github.com/phpstan/extension-installer) and [phpstan/phpstan](https://github.com/phpstan/phpstan). Updates `psr/log` from 3.0.0 to 3.0.1 - [Release notes](https://github.com/php-fig/log/releases) - [Commits](https://github.com/php-fig/log/compare/3.0.0...3.0.1) Updates `phpro/grumphp` from 2.6.0 to 2.7.0 - [Release notes](https://github.com/phpro/grumphp/releases) - [Commits](https://github.com/phpro/grumphp/compare/v2.6.0...v2.7.0) Updates `phpstan/extension-installer` from 1.4.1 to 1.4.2 - [Release notes](https://github.com/phpstan/extension-installer/releases) - [Commits](https://github.com/phpstan/extension-installer/compare/1.4.1...1.4.2) Updates `phpstan/phpstan` from 1.11.10 to 1.11.11 - [Release notes](https://github.com/phpstan/phpstan/releases) - [Changelog](https://github.com/phpstan/phpstan/blob/1.12.x/CHANGELOG.md) - [Commits](https://github.com/phpstan/phpstan/compare/1.11.10...1.11.11) --- updated-dependencies: - dependency-name: psr/log dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: phpro/grumphp dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: phpstan/extension-installer dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: phpstan/phpstan dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.lock | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/composer.lock b/composer.lock index a13e23329..5c9f416a4 100644 --- a/composer.lock +++ b/composer.lock @@ -2839,16 +2839,16 @@ }, { "name": "psr/log", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "reference": "79dff0b268932c640297f5208d6298f71855c03e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/79dff0b268932c640297f5208d6298f71855c03e", + "reference": "79dff0b268932c640297f5208d6298f71855c03e", "shasum": "" }, "require": { @@ -2883,9 +2883,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/php-fig/log/tree/3.0.1" }, - "time": "2021-07-14T16:46:02+00:00" + "time": "2024-08-21T13:31:24+00:00" }, { "name": "ralouphie/getallheaders", @@ -10480,16 +10480,16 @@ }, { "name": "phpro/grumphp", - "version": "v2.6.0", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/phpro/grumphp.git", - "reference": "a265d52fa18fd14824ac67a6a0fe95cd2c96135f" + "reference": "58739c13cd3c1140ccafac8593757cc1e547fc9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpro/grumphp/zipball/a265d52fa18fd14824ac67a6a0fe95cd2c96135f", - "reference": "a265d52fa18fd14824ac67a6a0fe95cd2c96135f", + "url": "https://api.github.com/repos/phpro/grumphp/zipball/58739c13cd3c1140ccafac8593757cc1e547fc9e", + "reference": "58739c13cd3c1140ccafac8593757cc1e547fc9e", "shasum": "" }, "require": { @@ -10591,9 +10591,9 @@ "description": "A composer plugin that enables source code quality checks.", "support": { "issues": "https://github.com/phpro/grumphp/issues", - "source": "https://github.com/phpro/grumphp/tree/v2.6.0" + "source": "https://github.com/phpro/grumphp/tree/v2.7.0" }, - "time": "2024-06-14T13:07:03+00:00" + "time": "2024-08-22T11:46:27+00:00" }, { "name": "phpspec/prophecy", @@ -10718,16 +10718,16 @@ }, { "name": "phpstan/extension-installer", - "version": "1.4.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/phpstan/extension-installer.git", - "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203" + "reference": "46c8219b3fb0deb3fc08301e8f0797d321d17dcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f6b87faf9fc7978eab2f7919a8760bc9f58f9203", - "reference": "f6b87faf9fc7978eab2f7919a8760bc9f58f9203", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/46c8219b3fb0deb3fc08301e8f0797d321d17dcd", + "reference": "46c8219b3fb0deb3fc08301e8f0797d321d17dcd", "shasum": "" }, "require": { @@ -10754,11 +10754,15 @@ "MIT" ], "description": "Composer plugin for automatic installation of PHPStan extensions", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.4.1" + "source": "https://github.com/phpstan/extension-installer/tree/1.4.2" }, - "time": "2024-06-10T08:20:49+00:00" + "time": "2024-08-26T07:38:00+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -10809,16 +10813,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.11.10", + "version": "1.11.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "640410b32995914bde3eed26fa89552f9c2c082f" + "reference": "707c2aed5d8d0075666e673a5e71440c1d01a5a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/640410b32995914bde3eed26fa89552f9c2c082f", - "reference": "640410b32995914bde3eed26fa89552f9c2c082f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/707c2aed5d8d0075666e673a5e71440c1d01a5a3", + "reference": "707c2aed5d8d0075666e673a5e71440c1d01a5a3", "shasum": "" }, "require": { @@ -10863,7 +10867,7 @@ "type": "github" } ], - "time": "2024-08-08T09:02:50+00:00" + "time": "2024-08-19T14:37:29+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", From a700f9283b49ee31f22fed93001f8171870d4ef0 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Tue, 27 Aug 2024 10:50:22 -0700 Subject: [PATCH 2/6] CLI-979: Consolidate update-check logic (#1774) * CLI-979: Consolidate update-check logic * a * remove guzzle cache * fix tests * upstream * test updates * refactor * fix updates * fix tests * update self-update --- .env.example | 3 + .gitignore | 1 + CONTRIBUTING.md | 10 +- bin/acli | 7 +- composer.json | 3 +- composer.lock | 290 ++++-------------- config/prod/services.yml | 13 +- src/Command/Acsf/AcsfCommandFactory.php | 4 + src/Command/Api/ApiCommandFactory.php | 4 + src/Command/App/LogTailCommand.php | 4 +- src/Command/CommandBase.php | 84 +---- src/Command/Ide/IdeCreateCommand.php | 4 +- src/Command/Pull/PullCommandBase.php | 4 +- tests/phpunit/src/Application/KernelTest.php | 2 +- tests/phpunit/src/ApplicationTestBase.php | 1 + tests/phpunit/src/CommandTestBase.php | 20 +- .../src/Commands/Acsf/AcsfApiCommandTest.php | 1 + .../src/Commands/App/LogTailCommandTest.php | 1 + .../src/Commands/Ide/IdeCreateCommandTest.php | 1 + .../src/Commands/Pull/PullCodeCommandTest.php | 1 + .../src/Commands/Pull/PullCommandTest.php | 1 + .../Commands/Pull/PullDatabaseCommandTest.php | 1 + .../Commands/Pull/PullFilesCommandTest.php | 1 + .../src/Commands/UpdateCommandTest.php | 43 ++- tests/phpunit/src/TestBase.php | 5 + 25 files changed, 146 insertions(+), 363 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..c9e997a9b --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +BUGSNAG_KEY=abcd1234 +AMPLITUDE_KEY=acbd1234 +ACLI_VERSION=1.0.0 diff --git a/.gitignore b/.gitignore index 44caf9627..7f5ec4468 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ drupal cx-api-spec gardener +.env // Artifacts from mutation testing *.cache diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d31b2a302..a19a3b232 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,19 +66,11 @@ Be sure to validate and test your code locally using the provided Composer test To test changes in production mode, build and run `acli.phar` using this process. The _build-release_ stage of [`.github/workflows/ci.yml`](.github/workflows/ci.yml) follows a similar process. 1. Install Composer production dependencies: `composer install --no-dev --optimize-autoloader` -2. Create a `.env` file with Bugsnag and Amplitude keys +2. Populate `.env`: `cp .env.example .env` 3. Clear and rebuild your Symfony caches: `./bin/acli ckc && ./bin/acli cc` 4. Install Box (only need to do this once): `composer box-install` 5. Compile phar: `composer box-compile` -### Testing the `update` command - -Any changes to the `acli update` command should be manually tested using the following steps: - -1. Replace `@package_version@` on this line with `1.0.0` or any older version string: https://github.com/acquia/cli/blob/v1.0.0/bin/acli#L84 -1. Build acli.phar as described above. -1. Now test: `./var/acli.phar self:update` - ### Writing tests New code should be covered at 100% (or as close to it as reasonably possible) by PHPUnit tests. It should also minimize the number of escaped mutants (as close to 0% as reasonably possible), which will appear as annotations on your PR after unit tests run. diff --git a/bin/acli b/bin/acli index 5c8c5c150..de300a07c 100755 --- a/bin/acli +++ b/bin/acli @@ -23,6 +23,7 @@ use Acquia\Cli\Exception\AcquiaCliException; use Acquia\Cli\Helpers\LocalMachineHelper; use Dotenv\Dotenv; use SelfUpdate\SelfUpdateCommand; +use SelfUpdate\SelfUpdateManager; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Filesystem\Filesystem; @@ -93,14 +94,14 @@ if (!getenv('ACLI_REPO_ROOT')) { $application = $container->get(Application::class); /** @var OutputInterface $output */ $output = $container->get(OutputInterface::class); -$application->setName('Acquia CLI'); -$application->setVersion(getenv('ACLI_VERSION')); /** @var ApiCommandHelper $helper */ $helper = $container->get(ApiCommandHelper::class); $application->addCommands($helper->getApiCommands( __DIR__ . '/../assets/acquia-spec.json', 'api', $container->get(ApiCommandFactory::class))); $application->addCommands($helper->getApiCommands( __DIR__ . '/../assets/acsf-spec.json', 'acsf', $container->get(AcsfCommandFactory::class))); try { - $application->add(new SelfUpdateCommand($application->getName(), $application->getVersion(), 'acquia/cli')); + /** @var SelfUpdateManager $selfUpdateManager*/ + $selfUpdateManager = $container->get(SelfUpdateManager::class); + $application->add(new SelfUpdateCommand($selfUpdateManager)); } catch (\UnexpectedValueException) { // Do nothing for development builds. diff --git a/composer.json b/composer.json index b184cb4f7..8d37e819a 100644 --- a/composer.json +++ b/composer.json @@ -17,12 +17,11 @@ "acquia/drupal-environment-detector": "^1.2.0", "bugsnag/bugsnag": "^3.0", "composer/semver": "^3.3", - "consolidation/self-update": "dev-main as 2.1.0", + "consolidation/self-update": "3.0.0-alpha1 as 2.1.0", "dflydev/dot-access-data": "^3", "grasmash/expander": "^3", "guzzlehttp/guzzle": "^7.4", "http-interop/http-factory-guzzle": "^1.0", - "kevinrob/guzzle-cache-middleware": "^5", "laminas/laminas-validator": "^2.20.0", "league/csv": "^9.8", "loophp/phposinfo": "^1.7.2", diff --git a/composer.lock b/composer.lock index 5c9f416a4..4c9913bb4 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "c49bd75c4ca413cd16cd85fe278e6352", + "content-hash": "31ee2d035e880509553850fb78e03a91", "packages": [ { "name": "acquia/drupal-environment-detector", @@ -407,26 +407,27 @@ }, { "name": "consolidation/self-update", - "version": "dev-main", + "version": "3.0.0-alpha1", "source": { "type": "git", "url": "https://github.com/consolidation/self-update.git", - "reference": "e3cc75a07c36b68bd5ab72ead23a375529fba71f" + "reference": "3476c5ef074e0953ad5c235a66f65b1c271d0faa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/self-update/zipball/e3cc75a07c36b68bd5ab72ead23a375529fba71f", - "reference": "e3cc75a07c36b68bd5ab72ead23a375529fba71f", + "url": "https://api.github.com/repos/consolidation/self-update/zipball/3476c5ef074e0953ad5c235a66f65b1c271d0faa", + "reference": "3476c5ef074e0953ad5c235a66f65b1c271d0faa", "shasum": "" }, "require": { "composer/semver": "^3.2", + "guzzlehttp/guzzle": "^7.9", + "kevinrob/guzzle-cache-middleware": "^5.1", "php": "^8.1", + "symfony/cache": "^5.4 || ^6.4 || ^7", "symfony/console": "^5.4 || ^6.4 || ^7", - "symfony/filesystem": "^5.4 || ^6.4 || ^7", - "symfony/http-client": "^5.4 || ^6.4 || ^7" + "symfony/filesystem": "^5.4 || ^6.4 || ^7" }, - "default-branch": true, "bin": [ "scripts/release" ], @@ -458,9 +459,9 @@ "description": "Provides a self:update command for Symfony Console applications.", "support": { "issues": "https://github.com/consolidation/self-update/issues", - "source": "https://github.com/consolidation/self-update/tree/main" + "source": "https://github.com/consolidation/self-update/tree/3.0.0-alpha1" }, - "time": "2024-07-18T18:42:07+00:00" + "time": "2024-08-27T17:12:45+00:00" }, { "name": "dflydev/dot-access-data", @@ -4727,177 +4728,6 @@ ], "time": "2024-04-27T10:22:22+00:00" }, - { - "name": "symfony/http-client", - "version": "v6.4.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client.git", - "reference": "b5e498f763e0bf5eed8dcd946e50a3b3f71d4ded" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/b5e498f763e0bf5eed8dcd946e50a3b3f71d4ded", - "reference": "b5e498f763e0bf5eed8dcd946e50a3b3f71d4ded", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-client-contracts": "^3.4.1", - "symfony/service-contracts": "^2.5|^3" - }, - "conflict": { - "php-http/discovery": "<1.15", - "symfony/http-foundation": "<6.3" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "1.0", - "symfony/http-client-implementation": "3.0" - }, - "require-dev": { - "amphp/amp": "^2.5", - "amphp/http-client": "^4.2.1", - "amphp/http-tunnel": "^1.0", - "amphp/socket": "^1.1", - "guzzlehttp/promises": "^1.4|^2.0", - "nyholm/psr7": "^1.0", - "php-http/httplug": "^1.0|^2.0", - "psr/http-client": "^1.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", - "homepage": "https://symfony.com", - "keywords": [ - "http" - ], - "support": { - "source": "https://github.com/symfony/http-client/tree/v6.4.10" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-07-15T09:26:24+00:00" - }, - { - "name": "symfony/http-client-contracts", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "20414d96f391677bf80078aa55baece78b82647d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/20414d96f391677bf80078aa55baece78b82647d", - "reference": "20414d96f391677bf80078aa55baece78b82647d", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to HTTP clients", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-04-18T09:32:20+00:00" - }, { "name": "symfony/http-foundation", "version": "v6.4.10", @@ -7852,48 +7682,48 @@ }, { "name": "composer/composer", - "version": "2.7.7", + "version": "2.7.8", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "291942978f39435cf904d33739f98d7d4eca7b23" + "reference": "a2edd4e4414c17008ab585e0c62574fdb644ebfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/291942978f39435cf904d33739f98d7d4eca7b23", - "reference": "291942978f39435cf904d33739f98d7d4eca7b23", + "url": "https://api.github.com/repos/composer/composer/zipball/a2edd4e4414c17008ab585e0c62574fdb644ebfc", + "reference": "a2edd4e4414c17008ab585e0c62574fdb644ebfc", "shasum": "" }, "require": { - "composer/ca-bundle": "^1.0", + "composer/ca-bundle": "^1.5", "composer/class-map-generator": "^1.3.3", "composer/metadata-minifier": "^1.0", - "composer/pcre": "^2.1 || ^3.1", + "composer/pcre": "^2.2 || ^3.2", "composer/semver": "^3.3", "composer/spdx-licenses": "^1.5.7", "composer/xdebug-handler": "^2.0.2 || ^3.0.3", - "justinrainbow/json-schema": "^5.2.11", + "justinrainbow/json-schema": "^5.3", "php": "^7.2.5 || ^8.0", "psr/log": "^1.0 || ^2.0 || ^3.0", - "react/promise": "^2.8 || ^3", + "react/promise": "^3.2", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.2", "seld/signal-handler": "^2.0", - "symfony/console": "^5.4.11 || ^6.0.11 || ^7", - "symfony/filesystem": "^5.4 || ^6.0 || ^7", - "symfony/finder": "^5.4 || ^6.0 || ^7", + "symfony/console": "^5.4.35 || ^6.3.12 || ^7.0.3", + "symfony/filesystem": "^5.4.35 || ^6.3.12 || ^7.0.3", + "symfony/finder": "^5.4.35 || ^6.3.12 || ^7.0.3", "symfony/polyfill-php73": "^1.24", "symfony/polyfill-php80": "^1.24", "symfony/polyfill-php81": "^1.24", - "symfony/process": "^5.4 || ^6.0 || ^7" + "symfony/process": "^5.4.35 || ^6.3.12 || ^7.0.3" }, "require-dev": { - "phpstan/phpstan": "^1.11.0", + "phpstan/phpstan": "^1.11.8", "phpstan/phpstan-deprecation-rules": "^1.2.0", "phpstan/phpstan-phpunit": "^1.4.0", "phpstan/phpstan-strict-rules": "^1.6.0", "phpstan/phpstan-symfony": "^1.4.0", - "symfony/phpunit-bridge": "^6.4.1 || ^7.0.1" + "symfony/phpunit-bridge": "^6.4.3 || ^7.0.1" }, "suggest": { "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", @@ -7946,7 +7776,7 @@ "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", "security": "https://github.com/composer/composer/security/policy", - "source": "https://github.com/composer/composer/tree/2.7.7" + "source": "https://github.com/composer/composer/tree/2.7.8" }, "funding": [ { @@ -7962,7 +7792,7 @@ "type": "tidelift" } ], - "time": "2024-06-10T20:11:12+00:00" + "time": "2024-08-22T13:28:36+00:00" }, { "name": "composer/metadata-minifier", @@ -8035,26 +7865,26 @@ }, { "name": "composer/pcre", - "version": "3.2.0", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90" + "reference": "1637e067347a0c40bbb1e3cd786b20dcab556a81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/ea4ab6f9580a4fd221e0418f2c357cdd39102a90", - "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90", + "url": "https://api.github.com/repos/composer/pcre/zipball/1637e067347a0c40bbb1e3cd786b20dcab556a81", + "reference": "1637e067347a0c40bbb1e3cd786b20dcab556a81", "shasum": "" }, "require": { "php": "^7.4 || ^8.0" }, "conflict": { - "phpstan/phpstan": "<1.11.8" + "phpstan/phpstan": "<1.11.10" }, "require-dev": { - "phpstan/phpstan": "^1.11.8", + "phpstan/phpstan": "^1.11.10", "phpstan/phpstan-strict-rules": "^1.1", "phpunit/phpunit": "^8 || ^9" }, @@ -8094,7 +7924,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.2.0" + "source": "https://github.com/composer/pcre/tree/3.3.0" }, "funding": [ { @@ -8110,7 +7940,7 @@ "type": "tidelift" } ], - "time": "2024-07-25T09:36:02+00:00" + "time": "2024-08-19T19:43:53+00:00" }, { "name": "composer/spdx-licenses", @@ -10813,16 +10643,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.11.11", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "707c2aed5d8d0075666e673a5e71440c1d01a5a3" + "reference": "384af967d35b2162f69526c7276acadce534d0e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/707c2aed5d8d0075666e673a5e71440c1d01a5a3", - "reference": "707c2aed5d8d0075666e673a5e71440c1d01a5a3", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/384af967d35b2162f69526c7276acadce534d0e1", + "reference": "384af967d35b2162f69526c7276acadce534d0e1", "shasum": "" }, "require": { @@ -10867,7 +10697,7 @@ "type": "github" } ], - "time": "2024-08-19T14:37:29+00:00" + "time": "2024-08-27T09:18:05+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -10918,35 +10748,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.31", + "version": "9.2.32", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", + "nikic/php-parser": "^4.19.1 || ^5.1.0", "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", - "theseer/tokenizer": "^1.2.0" + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.6" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -10955,7 +10785,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "9.2.x-dev" } }, "autoload": { @@ -10984,7 +10814,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" }, "funding": [ { @@ -10992,7 +10822,7 @@ "type": "github" } ], - "time": "2024-03-02T06:37:42+00:00" + "time": "2024-08-22T04:23:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -13405,15 +13235,13 @@ "aliases": [ { "package": "consolidation/self-update", - "version": "dev-main", + "version": "3.0.0.0-alpha1", "alias": "2.1.0", "alias_normalized": "2.1.0.0" } ], "minimum-stability": "dev", - "stability-flags": { - "consolidation/self-update": 20 - }, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/config/prod/services.yml b/config/prod/services.yml index 2ba0c2337..a1ec16643 100644 --- a/config/prod/services.yml +++ b/config/prod/services.yml @@ -1,6 +1,8 @@ --- parameters: env(ACLI_REPO_ROOT): "%kernel.project_dir%" + app.name: 'Acquia CLI' + app.version: "%env(ACLI_VERSION)%" app.data_dir: "%env(ACLI_HOME)%" app.project_dir: "%env(ACLI_REPO_ROOT)%" app.ssh_dir: "%env(HOME)%/.ssh" @@ -131,7 +133,10 @@ services: Acquia\Cli\ApiCredentialsInterface: '@acsf.credentials' # Symfony services. - Acquia\Cli\Application: ~ + Acquia\Cli\Application: + arguments: + $name: '%app.name%' + $version: '%app.version%' Symfony\Component\Console\Input\ArgvInput: ~ Symfony\Component\Console\Input\InputInterface: alias: Symfony\Component\Console\Input\ArgvInput @@ -148,3 +153,9 @@ services: # Guzzle service. GuzzleHttp\Client: ~ + + SelfUpdate\SelfUpdateManager: + arguments: + $applicationName: '%app.name%' + $currentVersion: '%app.version%' + $gitHubRepository: 'acquia/cli' diff --git a/src/Command/Acsf/AcsfCommandFactory.php b/src/Command/Acsf/AcsfCommandFactory.php index 9031d4590..dc412c360 100644 --- a/src/Command/Acsf/AcsfCommandFactory.php +++ b/src/Command/Acsf/AcsfCommandFactory.php @@ -14,6 +14,7 @@ use Acquia\Cli\Helpers\SshHelper; use Acquia\Cli\Helpers\TelemetryHelper; use Psr\Log\LoggerInterface; +use SelfUpdate\SelfUpdateManager; class AcsfCommandFactory implements CommandFactoryInterface { @@ -28,6 +29,7 @@ public function __construct( private SshHelper $sshHelper, private string $sshDir, private LoggerInterface $logger, + private SelfUpdateManager $selfUpdateManager, ) { } @@ -44,6 +46,7 @@ public function createCommand(): ApiBaseCommand $this->sshHelper, $this->sshDir, $this->logger, + $this->selfUpdateManager, ); } @@ -60,6 +63,7 @@ public function createListCommand(): AcsfListCommand $this->sshHelper, $this->sshDir, $this->logger, + $this->selfUpdateManager, ); } } diff --git a/src/Command/Api/ApiCommandFactory.php b/src/Command/Api/ApiCommandFactory.php index ed226121f..2e45f64a5 100644 --- a/src/Command/Api/ApiCommandFactory.php +++ b/src/Command/Api/ApiCommandFactory.php @@ -13,6 +13,7 @@ use Acquia\Cli\Helpers\SshHelper; use Acquia\Cli\Helpers\TelemetryHelper; use Psr\Log\LoggerInterface; +use SelfUpdate\SelfUpdateManager; class ApiCommandFactory implements CommandFactoryInterface { @@ -27,6 +28,7 @@ public function __construct( private SshHelper $sshHelper, private string $sshDir, private LoggerInterface $logger, + private SelfUpdateManager $selfUpdateManager, ) { } @@ -43,6 +45,7 @@ public function createCommand(): ApiBaseCommand $this->sshHelper, $this->sshDir, $this->logger, + $this->selfUpdateManager, ); } @@ -59,6 +62,7 @@ public function createListCommand(): ApiListCommand $this->sshHelper, $this->sshDir, $this->logger, + $this->selfUpdateManager, ); } } diff --git a/src/Command/App/LogTailCommand.php b/src/Command/App/LogTailCommand.php index 9109c1aff..feaf60209 100644 --- a/src/Command/App/LogTailCommand.php +++ b/src/Command/App/LogTailCommand.php @@ -16,6 +16,7 @@ use AcquiaCloudApi\Endpoints\Logs; use AcquiaLogstream\LogstreamManager; use Psr\Log\LoggerInterface; +use SelfUpdate\SelfUpdateManager; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -39,9 +40,10 @@ public function __construct( public SshHelper $sshHelper, protected string $sshDir, LoggerInterface $logger, + public selfUpdateManager $selfUpdateManager, protected LogstreamManager $logstreamManager, ) { - parent::__construct($this->localMachineHelper, $this->datastoreCloud, $this->datastoreAcli, $this->cloudCredentials, $this->telemetryHelper, $this->projectDir, $this->cloudApiClientService, $this->sshHelper, $this->sshDir, $logger); + parent::__construct($this->localMachineHelper, $this->datastoreCloud, $this->datastoreAcli, $this->cloudCredentials, $this->telemetryHelper, $this->projectDir, $this->cloudApiClientService, $this->sshHelper, $this->sshDir, $logger, $this->selfUpdateManager); } protected function configure(): void diff --git a/src/Command/CommandBase.php b/src/Command/CommandBase.php index a8f56a816..2f4be8628 100644 --- a/src/Command/CommandBase.php +++ b/src/Command/CommandBase.php @@ -41,21 +41,15 @@ use AcquiaLogstream\LogstreamManager; use ArrayObject; use Closure; -use Composer\Semver\Comparator; -use Composer\Semver\VersionParser; use Exception; -use GuzzleHttp\HandlerStack; use JsonException; -use Kevinrob\GuzzleCache\CacheMiddleware; -use Kevinrob\GuzzleCache\Storage\Psr6CacheStorage; -use Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy; use loophp\phposinfo\OsInfo; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Psr\Log\LoggerInterface; use Safe\Exceptions\FilesystemException; +use SelfUpdate\SelfUpdateManager; use stdClass; -use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\FormatterHelper; use Symfony\Component\Console\Helper\ProgressBar; @@ -103,8 +97,6 @@ abstract class CommandBase extends Command implements LoggerAwareInterface protected bool $drushHasActiveDatabaseConnection; - protected \GuzzleHttp\Client $updateClient; - public function __construct( public LocalMachineHelper $localMachineHelper, protected CloudDataStore $datastoreCloud, @@ -116,6 +108,7 @@ public function __construct( public SshHelper $sshHelper, protected string $sshDir, LoggerInterface $logger, + public selfUpdateManager $selfUpdateManager, ) { $this->logger = $logger; $this->setLocalDbPassword(); @@ -1203,9 +1196,12 @@ public function checkForNewVersion(): bool|string if (AcquiaDrupalEnvironmentDetector::isAhIdeEnv()) { return false; } + if ($this->getApplication()->getVersion() === 'UNKNOWN') { + return false; + } try { - if ($latest = $this->hasUpdate()) { - return $latest; + if (!$this->selfUpdateManager->isUpToDate()) { + return $this->selfUpdateManager->getLatestReleaseFromGithub()['tag_name']; } } catch (Exception) { $this->logger->debug("Could not determine if Acquia CLI has a new version available."); @@ -1213,72 +1209,6 @@ public function checkForNewVersion(): bool|string return false; } - /** - * Check if an update is available. - * - * @todo unify with consolidation/self-update and support unstable channels - */ - protected function hasUpdate(): bool|string - { - $versionParser = new VersionParser(); - // Fail fast on development builds (throw UnexpectedValueException). - $currentVersion = $versionParser->normalize($this->getApplication() - ->getVersion()); - $client = $this->getUpdateClient(); - $response = $client->get('https://api.github.com/repos/acquia/cli/releases'); - if ($response->getStatusCode() !== 200) { - $this->logger->debug('Encountered ' . $response->getStatusCode() . ' error when attempting to check for new ACLI releases on GitHub: ' . $response->getReasonPhrase()); - return false; - } - - $releases = json_decode((string) $response->getBody(), false, 512, JSON_THROW_ON_ERROR); - if (!isset($releases[0])) { - $this->logger->debug('No releases found at GitHub repository acquia/cli'); - return false; - } - - foreach ($releases as $release) { - if (!$release->prerelease) { - /** - * @var string $version - */ - $version = $release->tag_name; - $versionStability = VersionParser::parseStability($version); - $versionIsNewer = Comparator::greaterThan($versionParser->normalize($version), $currentVersion); - if ($versionStability === 'stable' && $versionIsNewer) { - return $version; - } - return false; - } - } - return false; - } - - public function setUpdateClient(\GuzzleHttp\Client $client): void - { - $this->updateClient = $client; - } - - public function getUpdateClient(): \GuzzleHttp\Client - { - if (!isset($this->updateClient)) { - $stack = HandlerStack::create(); - $stack->push( - new CacheMiddleware( - new PrivateCacheStrategy( - new Psr6CacheStorage( - new FilesystemAdapter('acli') - ) - ) - ), - 'cache' - ); - $client = new \GuzzleHttp\Client(['handler' => $stack]); - $this->setUpdateClient($client); - } - return $this->updateClient; - } - protected function fillMissingRequiredApplicationUuid(InputInterface $input, OutputInterface $output): void { if ( diff --git a/src/Command/Ide/IdeCreateCommand.php b/src/Command/Ide/IdeCreateCommand.php index 5aa5b3956..4d9903c05 100644 --- a/src/Command/Ide/IdeCreateCommand.php +++ b/src/Command/Ide/IdeCreateCommand.php @@ -20,6 +20,7 @@ use AcquiaCloudApi\Response\OperationResponse; use GuzzleHttp\Client; use Psr\Log\LoggerInterface; +use SelfUpdate\SelfUpdateManager; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -46,9 +47,10 @@ public function __construct( public SshHelper $sshHelper, protected string $sshDir, LoggerInterface $logger, + public selfUpdateManager $selfUpdateManager, protected Client $httpClient ) { - parent::__construct($this->localMachineHelper, $this->datastoreCloud, $this->datastoreAcli, $this->cloudCredentials, $this->telemetryHelper, $this->projectDir, $this->cloudApiClientService, $this->sshHelper, $this->sshDir, $logger); + parent::__construct($this->localMachineHelper, $this->datastoreCloud, $this->datastoreAcli, $this->cloudCredentials, $this->telemetryHelper, $this->projectDir, $this->cloudApiClientService, $this->sshHelper, $this->sshDir, $logger, $this->selfUpdateManager); } protected function configure(): void diff --git a/src/Command/Pull/PullCommandBase.php b/src/Command/Pull/PullCommandBase.php index 985166d98..3d7a424ff 100644 --- a/src/Command/Pull/PullCommandBase.php +++ b/src/Command/Pull/PullCommandBase.php @@ -29,6 +29,7 @@ use Psr\Http\Message\UriInterface; use Psr\Log\LoggerInterface; use React\EventLoop\Loop; +use SelfUpdate\SelfUpdateManager; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\InputInterface; @@ -58,9 +59,10 @@ public function __construct( public SshHelper $sshHelper, protected string $sshDir, LoggerInterface $logger, + public selfUpdateManager $selfUpdateManager, protected \GuzzleHttp\Client $httpClient ) { - parent::__construct($this->localMachineHelper, $this->datastoreCloud, $this->datastoreAcli, $this->cloudCredentials, $this->telemetryHelper, $this->projectDir, $this->cloudApiClientService, $this->sshHelper, $this->sshDir, $logger); + parent::__construct($this->localMachineHelper, $this->datastoreCloud, $this->datastoreAcli, $this->cloudCredentials, $this->telemetryHelper, $this->projectDir, $this->cloudApiClientService, $this->sshHelper, $this->sshDir, $logger, $this->selfUpdateManager); } /** diff --git a/tests/phpunit/src/Application/KernelTest.php b/tests/phpunit/src/Application/KernelTest.php index 0faec8699..2d31f55ba 100644 --- a/tests/phpunit/src/Application/KernelTest.php +++ b/tests/phpunit/src/Application/KernelTest.php @@ -26,7 +26,7 @@ public function testRun(): void private function getStart(): string { return <<endVersion is available", $this->getDisplay()); } public function testBadResponseFailsSilently(): void { - $this->setUpdateClient(403); - $this->application->setVersion('2.8.4'); + $this->application->setVersion($this->startVersion); + $this->mockSelfUpdateCommand(true); $this->executeCommand(); self::assertEquals(0, $this->getStatusCode()); - self::assertStringNotContainsString('Acquia CLI 2.8.5 is available', $this->getDisplay()); + self::assertStringNotContainsString("Acquia CLI $this->endVersion is available", $this->getDisplay()); } - public function testNetworkErrorFailsSilently(): void + /** + * @throws \GuzzleHttp\Exception\GuzzleException + */ + private function mockSelfUpdateCommand(bool $exception = false): void { - $guzzleClient = $this->prophet->prophesize(Client::class); - $guzzleClient->get('https://api.github.com/repos/acquia/cli/releases') - ->willThrow(RequestException::class); - $this->command->setUpdateClient($guzzleClient->reveal()); - $this->application->setVersion('2.8.4.9999s'); - $this->executeCommand(); - self::assertEquals(0, $this->getStatusCode()); - self::assertStringNotContainsString('Acquia CLI 2.8.5 is available', $this->getDisplay()); + $selfUpdateManagerProphecy = $this->prophet->prophesize(SelfUpdateManager::class); + if ($exception) { + $selfUpdateManagerProphecy->isUpToDate()->willThrow(new Exception())->shouldBeCalled(); + } else { + $selfUpdateManagerProphecy->isUpToDate() + ->willReturn(false) + ->shouldBeCalled(); + $selfUpdateManagerProphecy->getLatestReleaseFromGithub() + ->willReturn(['tag_name' => $this->endVersion]) + ->shouldBeCalled(); + } + $this->command->selfUpdateManager = $selfUpdateManagerProphecy->reveal(); } } diff --git a/tests/phpunit/src/TestBase.php b/tests/phpunit/src/TestBase.php index a2bfd0a28..1183c4997 100644 --- a/tests/phpunit/src/TestBase.php +++ b/tests/phpunit/src/TestBase.php @@ -30,6 +30,7 @@ use Prophecy\Prophet; use Psr\Http\Message\StreamInterface; use RuntimeException; +use SelfUpdate\SelfUpdateManager; use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Component\Cache\Adapter\PhpArrayAdapter; use Symfony\Component\Cache\CacheItem; @@ -110,6 +111,8 @@ abstract class TestBase extends TestCase protected ConsoleLogger $logger; + public selfUpdateManager $selfUpdateManager; + protected string $passphraseFilepath = '~/.passphrase'; protected vfsStreamDirectory $vfsRoot; @@ -175,6 +178,7 @@ protected function setUp(): void $this->consoleOutput = new ConsoleOutput(); $this->setClientProphecies(); $this->setIo(); + $this->selfUpdateManager = $this->prophet->prophesize(SelfUpdateManager::class)->reveal(); $this->vfsRoot = vfsStream::setup(); $this->projectDir = vfsStream::newDirectory('project') @@ -351,6 +355,7 @@ protected function injectCommand(string $commandName): Command $this->sshHelper, $this->sshDir, $this->logger, + $this->selfUpdateManager, ); } From 545192289e80aa516fac718b190dbb7a5183472c Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Fri, 30 Aug 2024 09:10:45 -0700 Subject: [PATCH 3/6] CLI-1380: Stop reporting memory exhaustion (#1785) --- src/Helpers/TelemetryHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Helpers/TelemetryHelper.php b/src/Helpers/TelemetryHelper.php index 56b5845d8..e5e575a66 100644 --- a/src/Helpers/TelemetryHelper.php +++ b/src/Helpers/TelemetryHelper.php @@ -54,9 +54,9 @@ public function initializeBugsnag(): void // Exclude reports from app:from, which bootstraps Drupal. case str_starts_with($report->getContext(), 'GET'): // Exclude memory exhaustion errors. - case str_starts_with($report->getContext(), 'Allowed memory size'): + case str_starts_with($report->getMessage(), 'Allowed memory size'): // Exclude i/o errors. - case str_starts_with($report->getContext(), 'fgets'): + case str_starts_with($report->getMessage(), 'fgets'): return false; } // Set user info. From a209ed11235defb386aee0e3a9685c9caac1dce4 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Fri, 30 Aug 2024 10:17:42 -0700 Subject: [PATCH 4/6] CLI-1379: TypeError in api:environments:cron-create (#1786) * CLI-1379: TypeError in api:environments:cron-create * mutation * mutation --- src/Command/Api/ApiCommandHelper.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Command/Api/ApiCommandHelper.php b/src/Command/Api/ApiCommandHelper.php index f2beb3dd9..70082ff0c 100644 --- a/src/Command/Api/ApiCommandHelper.php +++ b/src/Command/Api/ApiCommandHelper.php @@ -432,11 +432,12 @@ private function getRequestBodyFromParameterSchema(array $schema, array $acquiaC private function getPropertySpecFromRequestBodyParam(array $requestBodySchema, mixed $parameterDefinition): mixed { - return $requestBodySchema['properties'][$parameterDefinition->getName()] ?? null; + $name = self::restoreRenamedParameter($parameterDefinition->getName()); + return $requestBodySchema['properties'][$name] ?? null; } /** - * @return array + * @return array */ protected static function getParameterRenameMap(): array { @@ -449,7 +450,7 @@ protected static function getParameterRenameMap(): array ]; } - public static function renameParameter(mixed $propKey): mixed + private static function renameParameter(string $propKey): string { $parameterRenameMap = self::getParameterRenameMap(); if (array_key_exists($propKey, $parameterRenameMap)) { @@ -458,7 +459,7 @@ public static function renameParameter(mixed $propKey): mixed return $propKey; } - public static function restoreRenamedParameter(string $propKey): int|string + public static function restoreRenamedParameter(string $propKey): string { $parameterRenameMap = array_flip(self::getParameterRenameMap()); if (array_key_exists($propKey, $parameterRenameMap)) { From c072606006275f89a12e9fce95037e8da1783f99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:55:54 +0000 Subject: [PATCH 5/6] Bump the dependencies group with 2 updates (#1790) Bumps the dependencies group with 2 updates: [mikey179/vfsstream](https://github.com/bovigo/vfsStream) and [twig/twig](https://github.com/twigphp/Twig). Updates `mikey179/vfsstream` from 1.6.11 to 1.6.12 - [Release notes](https://github.com/bovigo/vfsStream/releases) - [Changelog](https://github.com/bovigo/vfsStream/blob/v1.6.12/CHANGELOG.md) - [Commits](https://github.com/bovigo/vfsStream/compare/v1.6.11...v1.6.12) Updates `twig/twig` from 3.11.0 to 3.12.0 - [Changelog](https://github.com/twigphp/Twig/blob/3.x/CHANGELOG) - [Commits](https://github.com/twigphp/Twig/compare/v3.11.0...v3.12.0) --- updated-dependencies: - dependency-name: mikey179/vfsstream dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: twig/twig dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- composer.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/composer.lock b/composer.lock index 4c9913bb4..2d3b4b178 100644 --- a/composer.lock +++ b/composer.lock @@ -9514,23 +9514,24 @@ }, { "name": "mikey179/vfsstream", - "version": "v1.6.11", + "version": "v1.6.12", "source": { "type": "git", "url": "https://github.com/bovigo/vfsStream.git", - "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f" + "reference": "fe695ec993e0a55c3abdda10a9364eb31c6f1bf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", - "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", + "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/fe695ec993e0a55c3abdda10a9364eb31c6f1bf0", + "reference": "fe695ec993e0a55c3abdda10a9364eb31c6f1bf0", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.1.0" }, "require-dev": { - "phpunit/phpunit": "^4.5|^5.0" + "phpunit/phpunit": "^7.5||^8.5||^9.6", + "yoast/phpunit-polyfills": "^2.0" }, "type": "library", "extra": { @@ -9561,7 +9562,7 @@ "source": "https://github.com/bovigo/vfsStream/tree/master", "wiki": "https://github.com/bovigo/vfsStream/wiki" }, - "time": "2022-02-23T02:02:42+00:00" + "time": "2024-08-29T18:43:31+00:00" }, { "name": "monolog/monolog", @@ -13095,24 +13096,23 @@ }, { "name": "twig/twig", - "version": "v3.11.0", + "version": "v3.12.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "e80fb8ebba85c7341a97a9ebf825d7fd4b77708d" + "reference": "4d19472d4ac1838e0b1f0e029ce1fa4040eb34ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/e80fb8ebba85c7341a97a9ebf825d7fd4b77708d", - "reference": "e80fb8ebba85c7341a97a9ebf825d7fd4b77708d", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/4d19472d4ac1838e0b1f0e029ce1fa4040eb34ea", + "reference": "4d19472d4ac1838e0b1f0e029ce1fa4040eb34ea", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php80": "^1.22", "symfony/polyfill-php81": "^1.29" }, "require-dev": { @@ -13159,7 +13159,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.11.0" + "source": "https://github.com/twigphp/Twig/tree/v3.12.0" }, "funding": [ { @@ -13171,7 +13171,7 @@ "type": "tidelift" } ], - "time": "2024-08-08T16:15:16+00:00" + "time": "2024-08-29T09:51:12+00:00" }, { "name": "webmozart/assert", From 99605802fe4c56246677b06220684effee4b120f Mon Sep 17 00:00:00 2001 From: Rohit Joshi Date: Thu, 5 Sep 2024 22:59:08 +0530 Subject: [PATCH 6/6] Adding example to push to multiple git remotes. (#1784) Co-authored-by: Dane Powell --- src/Command/Push/PushArtifactCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Command/Push/PushArtifactCommand.php b/src/Command/Push/PushArtifactCommand.php index 0c7d65e8b..96e03397b 100644 --- a/src/Command/Push/PushArtifactCommand.php +++ b/src/Command/Push/PushArtifactCommand.php @@ -60,7 +60,8 @@ protected function configure(): void . 'To run additional build or sanitization steps (e.g. npm install), add a post-install-cmd script to your composer.json file: https://getcomposer.org/doc/articles/scripts.md#command-events') ->addUsage('--destination-git-branch=main-build') ->addUsage('--source-git-tag=foo-build --destination-git-tag=1.0.0') - ->addUsage('--destination-git-urls=example@svn-1.prod.hosting.acquia.com:example.git --destination-git-branch=main-build'); + ->addUsage('--destination-git-urls=example@svn-1.prod.hosting.acquia.com:example.git --destination-git-branch=main-build') + ->addUsage('--destination-git-urls=example@svn-1.prod.hosting.acquia.com:example.git --destination-git-urls=example@svn-2.prod.hosting.acquia.com:example.git --destination-git-branch=main-build'); } protected function initialize(InputInterface $input, OutputInterface $output): void