@@ -124,18 +124,11 @@ jobs:
124124
125125 # Install dependencies and handle caching in one go.
126126 # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
127- - name : Install Composer dependencies - normal
128- if : matrix.php != 'nightly'
127+ - name : Install Composer dependencies
129128 uses : " ramsey/composer-install@v3"
130129 with :
131- # Bust the cache at least once a month - output format: YYYY-MM.
132- custom-cache-suffix : $(date -u "+%Y-%m")
133-
134- - name : Install Composer dependencies - ignore PHP restrictions
135- if : matrix.php == 'nightly'
136- uses : " ramsey/composer-install@v3"
137- with :
138- composer-options : --ignore-platform-req=php+
130+ # For PHP "nightly", we need to install with ignore platform reqs as not all dependencies may allow it yet.
131+ composer-options : ${{ matrix.php == 'nightly' && '--ignore-platform-req=php+' || '' }}
139132 # Bust the cache at least once a month - output format: YYYY-MM.
140133 custom-cache-suffix : $(date -u "+%Y-%m")
141134
@@ -312,19 +305,11 @@ jobs:
312305
313306 # Install dependencies and handle caching in one go.
314307 # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
315- - name : Install Composer dependencies - normal
316- if : matrix.php != 'nightly'
317- uses : " ramsey/composer-install@v3"
318- with :
319- composer-options : " --no-dev"
320- # Bust the cache at least once a month - output format: YYYY-MM.
321- custom-cache-suffix : $(date -u "+%Y-%m")
322-
323- - name : Install Composer dependencies - ignore PHP restrictions
324- if : matrix.php == 'nightly'
308+ - name : Install Composer dependencies
325309 uses : " ramsey/composer-install@v3"
326310 with :
327- composer-options : " --no-dev --ignore-platform-req=php+"
311+ # For PHP "nightly", we need to install with ignore platform reqs as not all dependencies may allow it yet.
312+ composer-options : ${{ matrix.php == 'nightly' && '--no-dev --ignore-platform-req=php+' || '--no-dev' }}
328313 # Bust the cache at least once a month - output format: YYYY-MM.
329314 custom-cache-suffix : $(date -u "+%Y-%m")
330315
0 commit comments