6464 #
6565 # The matrix is set up so as not to duplicate the builds which are run for code coverage.
6666 php : ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]
67- phpcs_version : ["4.x-dev"]
67+ phpcs_version : ["lowest", "stable", "4.x-dev"]
68+
69+ exclude :
70+ - php : " 8.3"
71+ phpcs_version : " lowest"
72+
73+ include :
74+ # Add some builds with variations of the dependency versions.
75+ - php : " 8.4"
76+ phpcs_version : " stable"
77+
78+ # Test against dev versions of all dependencies with select PHP versions for early detection of issues.
79+ - php : " 7.2"
80+ phpcs_version : " dev-master"
81+ - php : " 7.2"
82+ phpcs_version : " 4.x-dev"
83+ - php : " 7.4"
84+ phpcs_version : " 4.x-dev"
85+ - php : " 8.2"
86+ phpcs_version : " 4.x-dev"
6887
6988 name : " Test: PHP ${{ matrix.php }}"
7089
@@ -90,6 +109,14 @@ jobs:
90109 ini-values : ${{ steps.set_ini.outputs.PHP_INI }}
91110 coverage : none
92111
112+ - name : " Composer: set PHPCS version for tests (dev)"
113+ if : ${{ contains( matrix.phpcs_version, 'dev') }}
114+ run : composer require squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-update --no-scripts --no-interaction
115+
116+ - name : " Composer: use lock file when necessary"
117+ if : ${{ matrix.phpcs_version == 'lowest' }}
118+ run : composer config --unset lock
119+
93120 # Install dependencies and handle caching in one go.
94121 # @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
95122 - name : Install Composer dependencies
@@ -98,6 +125,10 @@ jobs:
98125 # Bust the cache at least once a month - output format: YYYY-MM.
99126 custom-cache-suffix : $(date -u "+%Y-%m")
100127
128+ - name : " Composer: set PHPCS version for tests (lowest)"
129+ if : ${{ matrix.phpcs_version == 'lowest' }}
130+ run : composer update squizlabs/php_codesniffer --prefer-lowest --no-scripts --no-interaction
131+
101132 - name : Composer info
102133 run : composer info
103134
0 commit comments