@@ -19,6 +19,10 @@ concurrency:
1919 group : ${{ github.workflow }}-${{ github.ref }}
2020 cancel-in-progress : true
2121
22+ env :
23+ # - COMPOSER_ROOT_VERSION is needed to get round the recursive dependency when using CI.
24+ COMPOSER_ROOT_VERSION : ' 1.99.99'
25+
2226jobs :
2327 lint :
2428 if : ${{ github.ref != 'refs/heads/develop' }}
@@ -76,53 +80,24 @@ jobs:
7680 # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
7781 #
7882 # IMPORTANT: test runs shouldn't fail because of PHPCS being incompatible with a PHP version.
79- # - PHPCS will run without errors on PHP 5.4 - 7.2 on any version.
80- # - PHP 7.3 needs PHPCS 2.9.2 and 3.3.1+ to run without notices.
81- # As deprecations are ignored for older PHPCS versions, our tests still shouldn't fail.
82- # - PHP 7.4 needs PHPCS 3.5.0+ to run without notices.
83- # As deprecations are ignored for older PHPCS versions, our tests still shouldn't fail.
84- # - PHP 8.0 needs PHPCS 3.5.0+ to run without (fatal) errors.
85- # To run reliably though, PHPCS 3.5.6 is needed, which undoes the PHP 8.0 comment tokenization changes is needed.
86- # - PHP 8.1 needs PHPCS 3.5.0+ to run without (fatal) errors.
87- # To run reliably though, PHPCS 3.5.6 is needed, which undoes the PHP 8.0 comment tokenization changes is needed.
88- # Additionally, until the new PHP 8.1 "&" tokenization is accounted for in various functions,
89- # tests will fail in combination with PHPCS < 3.6.1 (in which the new tokenization was undone).
9083 #
9184 # The matrix is set up so as not to duplicate the builds which are run for code coverage.
92- php : ['5.4', '5.5 ', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
93- phpcs_version : ['2.6.0', '2. 7.1', '2.8.1', '2.9.2', '3.1.0', '3.2.0', '3.3.1', '3.4.2', '3.5.0', '3.5.6', '3.6.0 ', 'dev-master']
85+ php : ['5.5 ', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0 ']
86+ phpcs_version : ['3. 7.1', 'dev-master']
9487 risky : [false]
9588 experimental : [false]
9689
97- exclude :
98- # Remove the builds which will already be run via quicktest/code coverage.
99- - php : ' 5.4'
100- phpcs_version : ' 2.6.0'
101- - php : ' 5.4'
102- phpcs_version : ' dev-master'
103- - php : ' 7.3'
104- phpcs_version : ' 2.9.2'
105-
10690 include :
107- # Add builds against PHP 8.0/8.1, but only against PHPCS versions which won't fatal out.
108- - php : ' 8.0'
109- phpcs_version : ' 3.5.6'
110- risky : false
111- experimental : false
112- - php : ' 8.0'
113- phpcs_version : ' 3.6.0'
91+ - php : ' 5.6'
92+ phpcs_version : ' 3.7.1'
11493 risky : false
11594 experimental : false
95+ extensions : ' :iconv' # Run with iconv disabled.
11696 - php : ' 8.0'
11797 phpcs_version : ' dev-master'
11898 risky : false
11999 experimental : false
120- extensions : ' :iconv' # Run one build with iconv disabled.
121-
122- - php : ' 8.1'
123- phpcs_version : ' 3.6.1' # dev-master is run in the code coverage job.
124- risky : false
125- experimental : false
100+ extensions : ' :iconv' # Run with iconv disabled.
126101
127102 # Experimental builds. These are allowed to fail.
128103 - php : ' 8.2'
@@ -176,6 +151,10 @@ jobs:
176151 - name : ' Composer: set PHPCS version for tests'
177152 run : composer require --no-update squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}"
178153
154+ # Remove PHPCSDevCS as it would (for now) prevent the tests from being able to run against PHPCS 4.x.
155+ - name : ' Composer: remove PHPCSDevCS'
156+ run : composer remove --dev --no-update phpcsstandards/phpcsdevcs
157+
179158 # Install dependencies and handle caching in one go.
180159 # @link https://github.com/marketplace/actions/install-composer-dependencies
181160 - name : Install Composer dependencies - normal
@@ -228,13 +207,13 @@ jobs:
228207 include :
229208 - php : ' 8.1'
230209 phpcs_version : ' dev-master'
231- - php : ' 7.3 '
232- phpcs_version : ' 2.9.2 '
210+ - php : ' 8.1 '
211+ phpcs_version : ' 3.7.1 '
233212 extensions : ' :iconv' # Run one build with iconv disabled.
234213 - php : ' 5.4'
235214 phpcs_version : ' dev-master'
236215 - php : ' 5.4'
237- phpcs_version : ' 2.6.0 '
216+ phpcs_version : ' 3.7.1 '
238217
239218 name : " Coverage: PHP ${{ matrix.php }} - PHPCS ${{ matrix.phpcs_version }}"
240219
@@ -304,6 +283,7 @@ jobs:
304283 PHPCSUTILS_USE_CACHE : false
305284
306285 # Uploading the results with PHP Coveralls v1 won't work from GH Actions, so switch the PHP version.
286+ # Also PHP Coveralls itself (still) isn't fully compatible with PHP 8.0+.
307287 - name : Switch to PHP 7.4
308288 if : ${{ success() && matrix.php != '7.4' }}
309289 uses : shivammathur/setup-php@v2
0 commit comments