diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 08e5849..ef08cd5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -48,18 +48,11 @@ jobs: # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer - - name: Install Composer dependencies - normal - if: matrix.php != 'nightly' + - name: Install Composer dependencies uses: "ramsey/composer-install@v3" with: - # Bust the cache at least once a month - output format: YYYY-MM. - custom-cache-suffix: $(date -u "+%Y-%m") - - - name: Install Composer dependencies - ignore PHP restrictions - if: matrix.php == 'nightly' - uses: "ramsey/composer-install@v3" - with: - composer-options: --ignore-platform-req=php+ + # For PHP "nightly", we need to install with ignore platform reqs as not all dependencies may allow it yet. + composer-options: ${{ matrix.php == 'nightly' && '--ignore-platform-req=php+' || '' }} # Bust the cache at least once a month - output format: YYYY-MM. custom-cache-suffix: $(date -u "+%Y-%m") diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 09ad398..4da9dc3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -124,18 +124,11 @@ jobs: # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer - - name: Install Composer dependencies - normal - if: matrix.php != 'nightly' + - name: Install Composer dependencies uses: "ramsey/composer-install@v3" with: - # Bust the cache at least once a month - output format: YYYY-MM. - custom-cache-suffix: $(date -u "+%Y-%m") - - - name: Install Composer dependencies - ignore PHP restrictions - if: matrix.php == 'nightly' - uses: "ramsey/composer-install@v3" - with: - composer-options: --ignore-platform-req=php+ + # For PHP "nightly", we need to install with ignore platform reqs as not all dependencies may allow it yet. + composer-options: ${{ matrix.php == 'nightly' && '--ignore-platform-req=php+' || '' }} # Bust the cache at least once a month - output format: YYYY-MM. custom-cache-suffix: $(date -u "+%Y-%m") @@ -312,19 +305,11 @@ jobs: # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer - - name: Install Composer dependencies - normal - if: matrix.php != 'nightly' - uses: "ramsey/composer-install@v3" - with: - composer-options: "--no-dev" - # Bust the cache at least once a month - output format: YYYY-MM. - custom-cache-suffix: $(date -u "+%Y-%m") - - - name: Install Composer dependencies - ignore PHP restrictions - if: matrix.php == 'nightly' + - name: Install Composer dependencies uses: "ramsey/composer-install@v3" with: - composer-options: "--no-dev --ignore-platform-req=php+" + # For PHP "nightly", we need to install with ignore platform reqs as not all dependencies may allow it yet. + composer-options: ${{ matrix.php == 'nightly' && '--no-dev --ignore-platform-req=php+' || '--no-dev' }} # Bust the cache at least once a month - output format: YYYY-MM. custom-cache-suffix: $(date -u "+%Y-%m")