Skip to content

Commit 04c090b

Browse files
committed
GH Actions/testing: minor simplification/maintainability improvement
Setup-PHP has an alias available for "PHP next" named `nightly`. While this change doesn't remove the annual task of updating the matrix when a new PHP version gets released, it does make this update a little less error prone as updating the `continue-on-error` conditions lower down in the scripts (disconnected from the matrix set up) can easily be forgotten. There are a few caveats to keep in mind about this change though: * Manually updating the matrix and the workflow gives (of course) more control over the exact PHP versions being used. * When using `nightly`, that control is relinquished partially to setup-php and partially to PHP itself as `nightly` will generally always be "PHP next". This means that `nightly` will effectively become PHP `8.5` at the time when setup-php updates the alias, which can be at any point in time between PHP src branching off the PHP `8.4` branch (happened last week when the first RC was created) and the moment PHP `8.4` is released. Note: there is [some discussion going](shivammathur/setup-php#867) to clarify when "nightly" becomes "PHP next next" (`8.5`). Looks like the current intention is to not change it until PHP 8.4 has been released. You can always check exactly what version is used for `nightly` though, by folding out the "Set up PHP environment" step and checking the PHP version listed there. Ref: * https://github.com/shivammathur/setup-php/?tab=readme-ov-file#php-version-optional
1 parent 2fc4bbd commit 04c090b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/reusable-testing.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ jobs:
164164
"dbtype": "sqlite"
165165
},
166166
{
167-
"php": "8.4",
167+
"php": "nightly",
168168
"wp": "trunk",
169169
"mysql": "8.0"
170170
},
171171
{
172-
"php": "8.4",
172+
"php": "nightly",
173173
"wp": "trunk",
174174
"dbtype": "sqlite"
175175
}
@@ -216,7 +216,7 @@ jobs:
216216
matrix: ${{ fromJson(needs.prepare-unit.outputs.matrix) }}
217217
runs-on: ubuntu-20.04
218218

219-
continue-on-error: ${{ matrix.php == '8.4' }}
219+
continue-on-error: ${{ matrix.php == 'nightly' }}
220220

221221
steps:
222222
- name: Check out source code
@@ -282,7 +282,7 @@ jobs:
282282
matrix: ${{ fromJson(needs.prepare-functional.outputs.matrix) }}
283283
runs-on: ubuntu-20.04
284284

285-
continue-on-error: ${{ matrix.dbtype == 'sqlite' || matrix.php == '8.4' }}
285+
continue-on-error: ${{ matrix.dbtype == 'sqlite' || matrix.php == 'nightly' }}
286286

287287
steps:
288288
- name: Check out source code

0 commit comments

Comments
 (0)