From 2b3cb8e436eda123b078f44f6842a9d1cd8f14e9 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 24 Sep 2025 10:04:18 +0200 Subject: [PATCH] Switch to ramsey/composer-install action --- .github/workflows/apiref.yml | 8 +++--- .github/workflows/backward-compatibility.yml | 3 +-- .github/workflows/build-issue-bot.yml | 10 ++++---- .github/workflows/changelog-generator.yml | 8 +++--- .github/workflows/e2e-tests.yml | 6 ++--- .github/workflows/issue-bot.yml | 26 +++++++++++--------- .github/workflows/lint.yml | 17 ++++++------- .github/workflows/phar.yml | 23 ++++++++--------- .github/workflows/reflection-golden-test.yml | 9 +++---- .github/workflows/static-analysis.yml | 12 +++------ .github/workflows/tests.yml | 15 ++++------- .github/workflows/update-phpstorm-stubs.yml | 3 +-- 12 files changed, 63 insertions(+), 77 deletions(-) diff --git a/.github/workflows/apiref.yml b/.github/workflows/apiref.yml index 7dc00cac9a..8847e326dc 100644 --- a/.github/workflows/apiref.yml +++ b/.github/workflows/apiref.yml @@ -37,12 +37,12 @@ jobs: coverage: "none" php-version: "8.2" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Install ApiGen dependencies" - working-directory: "apigen" - run: "composer install --no-interaction --no-progress" + uses: "ramsey/composer-install@v3" + with: + working-directory: "apigen" - name: "Run ApiGen" run: "apigen/vendor/bin/apigen -c apigen/apigen.neon --output docs -- src vendor/nikic/php-parser vendor/ondrejmirtes/better-reflection vendor/phpstan/phpdoc-parser" diff --git a/.github/workflows/backward-compatibility.yml b/.github/workflows/backward-compatibility.yml index 6960e70ec8..53f74a4996 100644 --- a/.github/workflows/backward-compatibility.yml +++ b/.github/workflows/backward-compatibility.yml @@ -34,8 +34,7 @@ jobs: coverage: "none" php-version: "8.2" - - name: "Install dependencies" - run: "composer install --no-dev --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Install BackwardCompatibilityCheck" run: | diff --git a/.github/workflows/build-issue-bot.yml b/.github/workflows/build-issue-bot.yml index 0c6904033b..4cb6286c2b 100644 --- a/.github/workflows/build-issue-bot.yml +++ b/.github/workflows/build-issue-bot.yml @@ -42,12 +42,12 @@ jobs: coverage: "none" php-version: "8.3" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - - name: "Install Issue Bot dependencies" - working-directory: "issue-bot" - run: "composer install --no-interaction --no-progress" + - name: "Install issue-bot dependencies" + uses: "ramsey/composer-install@v3" + with: + working-directory: "issue-bot" - name: "Tests" working-directory: "issue-bot" diff --git a/.github/workflows/changelog-generator.yml b/.github/workflows/changelog-generator.yml index e2a95c8220..1dfc0d775c 100644 --- a/.github/workflows/changelog-generator.yml +++ b/.github/workflows/changelog-generator.yml @@ -35,12 +35,12 @@ jobs: coverage: "none" php-version: "8.2" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Install Changelog Generator dependencies" - working-directory: "changelog-generator" - run: "composer install --no-interaction --no-progress" + uses: "ramsey/composer-install@v3" + with: + working-directory: "changelog-generator" - name: "PHPStan" working-directory: "changelog-generator" diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 4625810998..f6a3e86255 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -298,8 +298,7 @@ jobs: extensions: mbstring ini-values: memory_limit=256M - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Patch PHPStan" run: "patch src/Analyser/Error.php < e2e/PHPStanErrorPatch.patch" @@ -411,8 +410,7 @@ jobs: tools: ${{ matrix.tools }} extensions: ${{ matrix.extensions }} - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Install bashunit" run: "curl -s https://bashunit.typeddevs.com/install.sh | bash -s e2e/ 0.22.0" diff --git a/.github/workflows/issue-bot.yml b/.github/workflows/issue-bot.yml index c62816c8b6..19055acdc7 100644 --- a/.github/workflows/issue-bot.yml +++ b/.github/workflows/issue-bot.yml @@ -40,9 +40,10 @@ jobs: coverage: "none" php-version: "8.3" - - name: "Install Issue Bot dependencies" - working-directory: "issue-bot" - run: "composer install --no-interaction --no-progress" + - name: "Install issue-bot dependencies" + uses: "ramsey/composer-install@v3" + with: + working-directory: "issue-bot" - name: "Cache downloads" uses: actions/cache@v4 @@ -90,12 +91,14 @@ jobs: coverage: "none" php-version: "8.3" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress --no-dev" + - uses: "ramsey/composer-install@v3" + with: + composer-options: "--no-dev" - - name: "Install Issue Bot dependencies" - working-directory: "issue-bot" - run: "composer install --no-interaction --no-progress" + - name: "Install issue-bot dependencies" + uses: "ramsey/composer-install@v3" + with: + working-directory: "issue-bot" - uses: Wandalen/wretry.action@v3.8.0 with: @@ -132,9 +135,10 @@ jobs: coverage: "none" php-version: "8.3" - - name: "Install Issue Bot dependencies" - working-directory: "issue-bot" - run: "composer install --no-interaction --no-progress" + - name: "Install issue-bot dependencies" + uses: "ramsey/composer-install@v3" + with: + working-directory: "issue-bot" - uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 18964a669d..f9c451b89d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -44,8 +44,7 @@ jobs: if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1' run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Change to simple-downgrade PHP version" if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1' @@ -100,12 +99,12 @@ jobs: - name: "Validate Composer" run: "composer validate" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Install build-cs dependencies" - working-directory: "build-cs" - run: "composer install --no-interaction --no-progress" + uses: "ramsey/composer-install@v3" + with: + working-directory: "build-cs" - name: "Lint" run: "make lint" @@ -129,8 +128,7 @@ jobs: coverage: "none" php-version: "8.3" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Composer Dependency Analyser" run: "make composer-dependency-analyser" @@ -151,8 +149,7 @@ jobs: coverage: "none" php-version: "8.5" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Name Collision Detector" run: "make name-collision" diff --git a/.github/workflows/phar.yml b/.github/workflows/phar.yml index e12c7fe986..6485a87369 100644 --- a/.github/workflows/phar.yml +++ b/.github/workflows/phar.yml @@ -38,15 +38,16 @@ jobs: php-version: "8.2" extensions: mbstring, intl - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" # only sebastian/diff ^4 supports PHP 7.4 so we need that in the PHAR - name: "Downgrade PHPUnit" run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs" - name: "Install compiler dependencies" - run: "composer install --no-interaction --no-progress --working-dir=compiler" + uses: "ramsey/composer-install@v3" + with: + working-directory: "compiler" - name: "Compiler tests" working-directory: "compiler" @@ -64,8 +65,9 @@ jobs: run: "composer dump" - name: "Install Box dependencies" - working-directory: "compiler/box" - run: "composer install" + uses: "ramsey/composer-install@v3" + with: + working-directory: "compiler/box" - name: "Compile PHAR" working-directory: "compiler/build" @@ -86,8 +88,7 @@ jobs: - name: "Set autoloader suffix" run: "composer config autoloader-suffix PHPStanChecksum" - - name: "Composer dump" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" env: COMPOSER_ROOT_VERSION: "2.1.x-dev" @@ -250,12 +251,12 @@ jobs: coverage: "none" php-version: "8.2" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Install Box dependencies" - working-directory: "compiler/box" - run: "composer install" + uses: "ramsey/composer-install@v3" + with: + working-directory: "compiler/box" - name: "Extract old phpstan.phar" run: "php compiler/box/vendor/bin/box extract phar-file-checksum-base/phpstan.phar phar-old" diff --git a/.github/workflows/reflection-golden-test.yml b/.github/workflows/reflection-golden-test.yml index 44cceae778..7f962ce2c0 100644 --- a/.github/workflows/reflection-golden-test.yml +++ b/.github/workflows/reflection-golden-test.yml @@ -43,8 +43,7 @@ jobs: # Include exotic extensions to discover more symbols extensions: ds,mbstring,runkit7,scoutapm,seaslog,simdjson,var_representation,yac - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Dump phpSymbols.txt" run: "php tests/dump-reflection-test-symbols.php" @@ -94,8 +93,7 @@ jobs: ini-file: development ini-values: memory_limit=2G - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Dump previous reflection data" run: "php tests/generate-reflection-test.php" @@ -108,8 +106,7 @@ jobs: - name: "Checkout" uses: actions/checkout@v4 - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Reflection golden test" run: "make tests-golden-reflection || true" diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index f0d8c65fd4..ec4fb7ba05 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -54,8 +54,7 @@ jobs: shell: bash run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Change to simple-downgrade PHP version" if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1' @@ -113,8 +112,7 @@ jobs: ini-file: development extensions: mbstring - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Cache Result cache" uses: actions/cache@v4 @@ -150,8 +148,7 @@ jobs: php-version: "8.2" ini-file: development - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Generate baseline" run: | @@ -176,8 +173,7 @@ jobs: php-version: "8.2" ini-file: development - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Generate baseline" run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e90274c4e2..cff6d8792a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -52,8 +52,7 @@ jobs: ini-file: development ini-values: memory_limit=2G - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Tests" run: "make tests" @@ -82,8 +81,7 @@ jobs: ini-file: development ini-values: memory_limit=1G - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Tests" run: "make tests-integration" @@ -107,8 +105,7 @@ jobs: ini-file: development ini-values: memory_limit=1G - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - id: set-matrix run: echo "matrix=$(php .github/workflows/tests-levels-matrix.php)" >> $GITHUB_OUTPUT @@ -142,8 +139,7 @@ jobs: ini-file: development ini-values: memory_limit=1G - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Tests" run: "${{ matrix.script }}" @@ -180,8 +176,7 @@ jobs: shell: bash run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Downgrade PHPUnit with Paratest" shell: bash diff --git a/.github/workflows/update-phpstorm-stubs.yml b/.github/workflows/update-phpstorm-stubs.yml index cd528fcfb6..ad4ae46d60 100644 --- a/.github/workflows/update-phpstorm-stubs.yml +++ b/.github/workflows/update-phpstorm-stubs.yml @@ -24,8 +24,7 @@ jobs: with: coverage: "none" php-version: "8.2" - - name: "Install dependencies" - run: "composer install --no-interaction --no-progress" + - uses: "ramsey/composer-install@v3" - name: "Checkout stubs" uses: actions/checkout@v4 with: