File tree Expand file tree Collapse file tree 5 files changed +25
-6
lines changed Expand file tree Collapse file tree 5 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 3131 - composer install
3232 script :
3333 - vendor/bin/phpunit
34+ - language : php
35+ php : 8.0
36+ install :
37+ # For PHP 8.0+, we need to ignore platform reqs as PHPUnit 7 is still used.
38+ - composer install --ignore-platform-reqs
39+ script :
40+ - vendor/bin/phpunit
41+ - language : php
42+ php : 8.1
43+ install :
44+ # For PHP 8.0+, we need to ignore platform reqs as PHPUnit 7 is still used.
45+ - composer install --ignore-platform-reqs
46+ script :
47+ # For PHP 8.1+, we need to ignore the config file so that PHPUnit 7 doesn't try to read it and cause an error.
48+ # Instead, we pass all required settings as part of the phpunit command.
49+ - vendor/bin/phpunit --no-configuration --bootstrap=tests/bootstrap.php --dont-report-useless-tests tests/AllSniffs.php
50+ - vendor/bin/phpunit --no-configuration --bootstrap=tests/bootstrap.php --dont-report-useless-tests tests/FixtureTests.php
3451 - language : node_js
3552 node_js : 16
3653 install :
Original file line number Diff line number Diff line change 55 "license" : " GPL-2.0-or-later" ,
66 "require" : {
77 "php" : " >=7.1" ,
8- "wp-coding-standards/wpcs" : " 2.2.1 " ,
8+ "wp-coding-standards/wpcs" : " 2.3.0 " ,
99 "automattic/vipwpcs" : " 2.0.0" ,
1010 "fig-r/psr2r-sniffer" : " ^0.5.0" ,
1111 "phpcompatibility/phpcompatibility-wp" : " ^2.0.0" ,
12- "squizlabs/php_codesniffer" : " ~3.5.0 " ,
12+ "squizlabs/php_codesniffer" : " ~3.5" ,
1313 "dealerdirect/phpcodesniffer-composer-installer" : " ^0.7.0"
1414 },
1515 "require-dev" : {
16- "phpunit/phpunit" : " ^5. 7"
16+ "phpunit/phpunit" : " ^7"
1717 },
1818 "scripts" : {
1919 "test" : " phpunit"
Original file line number Diff line number Diff line change 11<phpunit
2+ beStrictAboutTestsThatDoNotTestAnything=" false"
23 bootstrap=" tests/bootstrap.php"
34 colors=" true"
45 convertErrorsToExceptions=" true"
78>
89 <testsuites >
910 <!-- Default test suite to run all tests -->
10- <testsuite >
11+ <testsuite name = " all " >
1112 <file >tests/AllSniffs.php</file >
1213 <file >tests/FixtureTests.php</file >
1314 </testsuite >
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ public static function main() {
4242 public static function suite () {
4343 $ GLOBALS ['PHP_CODESNIFFER_SNIFF_CODES ' ] = array ();
4444 $ GLOBALS ['PHP_CODESNIFFER_FIXABLE_CODES ' ] = array ();
45+ $ GLOBALS ['PHP_CODESNIFFER_SNIFF_CASE_FILES ' ] = array ();
4546
4647 $ suite = new TestSuite ( 'HM Standards ' );
4748
Original file line number Diff line number Diff line change 66
77// Check phpcs is installed.
88$ phpcs_dir = dirname ( __DIR__ ) . '/vendor/squizlabs/php_codesniffer ' ;
9- if ( ! file_exists ($ phpcs_dir) ) {
10- throw new Exception ( 'Could not find PHP_CodeSniffer. Run `composer install --prefer-source --dev ` ' );
9+ if ( ! file_exists ( $ phpcs_dir ) ) {
10+ throw new Exception ( 'Could not find PHP_CodeSniffer. Run `composer install --prefer-source` ' );
1111}
1212
1313// Check phpcs' test framework is available.
You can’t perform that action at this time.
0 commit comments