@@ -28,14 +28,14 @@ jobs:
28
28
29
29
strategy :
30
30
matrix :
31
- php : ['5.4', 'latest', '8.3 ']
31
+ php : ['5.4', 'latest', '8.4 ']
32
32
33
33
name : " Lint: PHP ${{ matrix.php }}"
34
- continue-on-error : ${{ matrix.php == '8.3 ' }}
34
+ continue-on-error : ${{ matrix.php == '8.4 ' }}
35
35
36
36
steps :
37
37
- name : Checkout code
38
- uses : actions/checkout@v3
38
+ uses : actions/checkout@v4
39
39
40
40
- name : Install PHP
41
41
uses : shivammathur/setup-php@v2
45
45
tools : cs2pr
46
46
47
47
- name : Install Composer dependencies
48
- uses : " ramsey/composer-install@v2 "
48
+ uses : " ramsey/composer-install@v3 "
49
49
with :
50
50
# Bust the cache at least once a month - output format: YYYY-MM.
51
51
custom-cache-suffix : $(date -u "+%Y-%m")
67
67
# - PHPCS will run without errors on PHP 5.4 - 7.4 on any supported version.
68
68
# - PHP 8.0 needs PHPCS 3.5.7+ to run without errors, and we require a higher minimum version.
69
69
# - PHP 8.1 needs PHPCS 3.6.1+ to run without errors, but works best with 3.7.1+, and we require at least this minimum version.
70
+ # - PHP 8.2 and 8.3 need PHPCS 3.8.0+ to run without errors (though the errors don't affect the tests).
70
71
matrix :
71
- php : ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
72
+ php : ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
72
73
dependencies : ['lowest', 'stable']
73
74
74
75
include :
@@ -79,20 +80,20 @@ jobs:
79
80
dependencies : ' dev'
80
81
- php : ' 7.4'
81
82
dependencies : ' dev'
82
- - php : ' 8.2 '
83
+ - php : ' 8.3 '
83
84
dependencies : ' dev'
84
85
85
86
# Test against upcoming PHP version.
86
- - php : ' 8.3 '
87
+ - php : ' 8.4 '
87
88
dependencies : ' dev'
88
89
89
90
name : " Test: PHP ${{ matrix.php }} - PHPCS ${{ matrix.dependencies }}"
90
91
91
- continue-on-error : ${{ matrix.php == '8.3 ' }}
92
+ continue-on-error : ${{ matrix.php == '8.4 ' }}
92
93
93
94
steps :
94
95
- name : Checkout code
95
- uses : actions/checkout@v3
96
+ uses : actions/checkout@v4
96
97
97
98
# With stable PHPCS dependencies, allow for PHP deprecation notices.
98
99
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
@@ -123,25 +124,15 @@ jobs:
123
124
wp-coding-standards/wpcs:"dev-develop"
124
125
125
126
# Install dependencies and handle caching in one go.
126
- # @link https://github.com/marketplace/actions/install-composer-dependencies
127
- - name : Install Composer dependencies - normal
128
- if : ${{ startsWith( matrix.php, '8' ) == false }}
129
- uses : " ramsey/composer-install@v2"
127
+ # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
128
+ - name : Install Composer dependencies
129
+ uses : " ramsey/composer-install@v3"
130
130
with :
131
131
# Bust the cache at least once a month - output format: YYYY-MM.
132
132
custom-cache-suffix : $(date -u "+%Y-%m")
133
133
134
- # PHPUnit 7.x does not allow for installation on PHP 8, so ignore platform
135
- # requirements to get PHPUnit 7.x to install on nightly.
136
- - name : Install Composer dependencies - with ignore platform
137
- if : ${{ startsWith( matrix.php, '8' ) }}
138
- uses : " ramsey/composer-install@v2"
139
- with :
140
- composer-options : --ignore-platform-req=php+
141
- custom-cache-suffix : $(date -u "+%Y-%m")
142
-
143
134
- name : " Composer: downgrade PHPCS dependencies for tests (lowest)"
144
- if : ${{ ! startsWith( matrix.php, '8' ) && matrix.dependencies == 'lowest' }}
135
+ if : ${{ matrix.dependencies == 'lowest' }}
145
136
run : >
146
137
composer update --prefer-lowest --no-scripts --no-interaction
147
138
squizlabs/php_codesniffer
@@ -150,16 +141,6 @@ jobs:
150
141
sirbrillig/phpcs-variable-analysis
151
142
wp-coding-standards/wpcs
152
143
153
- - name : " Composer: downgrade PHPCS dependencies for tests (lowest) - with ignore platform"
154
- if : ${{ startsWith( matrix.php, '8' ) && matrix.dependencies == 'lowest' }}
155
- run : >
156
- composer update --prefer-lowest --no-scripts --no-interaction --ignore-platform-req=php+
157
- squizlabs/php_codesniffer
158
- phpcsstandards/phpcsutils
159
- phpcsstandards/phpcsextra
160
- sirbrillig/phpcs-variable-analysis
161
- wp-coding-standards/wpcs
162
-
163
144
- name : Run the unit tests
164
145
run : ./bin/unit-tests
165
146
0 commit comments