@@ -28,14 +28,14 @@ jobs:
2828
2929 strategy :
3030 matrix :
31- php : ['5.4', 'latest', '8.3 ']
31+ php : ['5.4', 'latest', '8.4 ']
3232
3333 name : " Lint: PHP ${{ matrix.php }}"
34- continue-on-error : ${{ matrix.php == '8.3 ' }}
34+ continue-on-error : ${{ matrix.php == '8.4 ' }}
3535
3636 steps :
3737 - name : Checkout code
38- uses : actions/checkout@v3
38+ uses : actions/checkout@v4
3939
4040 - name : Install PHP
4141 uses : shivammathur/setup-php@v2
4545 tools : cs2pr
4646
4747 - name : Install Composer dependencies
48- uses : " ramsey/composer-install@v2 "
48+ uses : " ramsey/composer-install@v3 "
4949 with :
5050 # Bust the cache at least once a month - output format: YYYY-MM.
5151 custom-cache-suffix : $(date -u "+%Y-%m")
6767 # - PHPCS will run without errors on PHP 5.4 - 7.4 on any supported version.
6868 # - PHP 8.0 needs PHPCS 3.5.7+ to run without errors, and we require a higher minimum version.
6969 # - 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).
7071 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' ]
7273 dependencies : ['lowest', 'stable']
7374
7475 include :
@@ -79,20 +80,20 @@ jobs:
7980 dependencies : ' dev'
8081 - php : ' 7.4'
8182 dependencies : ' dev'
82- - php : ' 8.2 '
83+ - php : ' 8.3 '
8384 dependencies : ' dev'
8485
8586 # Test against upcoming PHP version.
86- - php : ' 8.3 '
87+ - php : ' 8.4 '
8788 dependencies : ' dev'
8889
8990 name : " Test: PHP ${{ matrix.php }} - PHPCS ${{ matrix.dependencies }}"
9091
91- continue-on-error : ${{ matrix.php == '8.3 ' }}
92+ continue-on-error : ${{ matrix.php == '8.4 ' }}
9293
9394 steps :
9495 - name : Checkout code
95- uses : actions/checkout@v3
96+ uses : actions/checkout@v4
9697
9798 # With stable PHPCS dependencies, allow for PHP deprecation notices.
9899 # 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:
123124 wp-coding-standards/wpcs:"dev-develop"
124125
125126 # 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"
130130 with :
131131 # Bust the cache at least once a month - output format: YYYY-MM.
132132 custom-cache-suffix : $(date -u "+%Y-%m")
133133
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-
143134 - name : " Composer: downgrade PHPCS dependencies for tests (lowest)"
144- if : ${{ ! startsWith( matrix.php, '8' ) && matrix.dependencies == 'lowest' }}
135+ if : ${{ matrix.dependencies == 'lowest' }}
145136 run : >
146137 composer update --prefer-lowest --no-scripts --no-interaction
147138 squizlabs/php_codesniffer
@@ -150,16 +141,6 @@ jobs:
150141 sirbrillig/phpcs-variable-analysis
151142 wp-coding-standards/wpcs
152143
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-
163144 - name : Run the unit tests
164145 run : ./bin/unit-tests
165146
0 commit comments