Skip to content

Commit bdbb090

Browse files
Fix: GitHub workflows broken due to outdated versions / OS (#255)
# Summary <!-- Required --> Updates the versions used for various actions to address: > Error: This request has been automatically failed because it uses a deprecated version of `actions/cache: 937d24475381cd9c75ae6db12cb4e79714b926ed`. Please update your workflow to use v3/v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down Also removes deprecated usage of ubuntu-20.04 -- see actions/runner-images#11101 Also updates the phpstan config to address an unrelated failure. See https://github.com/10up/wp_mock/pull/255/files#r1983301587 ## Details <!-- Optional --> <!-- Please include a detailed explanation of the changes and/or the reasoning behind them. --> ## Contributor checklist <!-- Required --> <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you are unsure about any of these, please ask for clarification. We are here to help! --> - [ ] I agree to follow this project's [**Code of Conduct**](https://github.com/10up/.github/blob/trunk/CODE_OF_CONDUCT.md). - [ ] I have updated the documentation accordingly - [ ] I have added tests to cover changes introduced by this pull request - [ ] All new and existing tests pass ## Testing <!-- Required --> - [ ] Code review - [ ] Checks pass / GH actions run successfully ### Reviewer checklist <!-- Required --> <!-- The following checklist is for the reviewer: add any steps that may be relevant while reviewing this pull request --> - [ ] Code changes review - [ ] Documentation changes review - [ ] Unit tests pass - [ ] Static analysis passes
1 parent 7e34b7e commit bdbb090

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,27 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
php: [ '8.3', '8.2', '8.1' ]
16-
os: [ 'ubuntu-latest' ]
1715
include:
16+
- php: '8.3'
17+
os: 'ubuntu-latest'
18+
- php: '8.2'
19+
os: 'ubuntu-latest'
20+
- php: '8.1'
21+
os: 'ubuntu-latest'
1822
- php: '8.0'
19-
os: 'ubuntu-20.04'
23+
os: 'ubuntu-24.04'
2024
- php: '7.4'
21-
os: 'ubuntu-20.04'
25+
os: 'ubuntu-24.04'
2226
fail-fast: false
2327
env:
2428
COVERAGE_CACHE_PATH: phpunit-coverage-cache
2529
PHP_VERSION: ${{ matrix.php }}
2630

2731
steps:
28-
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # v2.4.2
32+
- uses: actions/checkout@v4
2933

3034
- name: Set up PHP ${{ matrix.php }}
31-
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2.28.0
35+
uses: shivammathur/setup-php@v2
3236
with:
3337
php-version: ${{ matrix.php }}
3438
coverage: pcov
@@ -37,7 +41,7 @@ jobs:
3741
id: composer-cache
3842
run: |
3943
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
40-
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # v2.1.7
44+
- uses: actions/cache@v4
4145
with:
4246
path: ${{ steps.composer-cache.outputs.dir }}
4347
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -48,7 +52,7 @@ jobs:
4852
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
4953

5054
- name: Restore phpunit coverage cache
51-
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # v2.1.7
55+
uses: actions/cache@v4
5256
with:
5357
path: ${{ env.COVERAGE_CACHE_PATH }}
5458
key: ${{ runner.os }}-coverage-${{ github.ref }}-${{ github.sha }}
@@ -77,14 +81,14 @@ jobs:
7781
runs-on: ubuntu-latest
7882

7983
steps:
80-
- uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0
84+
- uses: actions/checkout@v4
8185

8286
- name: Get Composer Cache Directory
8387
id: composer-cache
8488
run: |
8589
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
8690
87-
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
91+
- uses: actions/cache@v4
8892
with:
8993
path: ${{ steps.composer-cache.outputs.dir }}
9094
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -101,13 +105,13 @@ jobs:
101105
runs-on: ubuntu-latest
102106

103107
steps:
104-
- uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # v2.5.0
108+
- uses: actions/checkout@v4
105109

106110
- name: Get Composer Cache Directory
107111
id: composer-cache
108112
run: |
109113
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
110-
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
114+
- uses: actions/cache@v4
111115
with:
112116
path: ${{ steps.composer-cache.outputs.dir }}
113117
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ includes:
33
parameters:
44
level: max
55
reportUnmatchedIgnoredErrors: false
6+
treatPhpDocTypesAsCertain: false
67
exceptions:
78
check:
89
missingCheckedExceptionInThrows: true

0 commit comments

Comments
 (0)