Skip to content

Commit 9db39be

Browse files
committed
WAIT - PHPCS master to 3.x branch rename | GH Actions: allow for upstream branch rename
1 parent 004191b commit 9db39be

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.github/workflows/cs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ jobs:
3939
run: |
4040
# The sniff stage doesn't run the unit tests, so no need for PHPUnit.
4141
composer remove --no-update --dev phpunit/phpunit --no-scripts --no-interaction
42-
# Using PHPCS `master` as an early detection system for bugs upstream.
43-
composer require --no-update squizlabs/php_codesniffer:"dev-master" --no-interaction
42+
# Using PHPCS `3.x` as an early detection system for bugs upstream.
43+
# This should be changed to 4.x, but we'll need to wait for PHPCSDevCS to be compatible with 4.x.
44+
composer require --no-update squizlabs/php_codesniffer:"3.x-dev" --no-interaction
4445
4546
# Install dependencies and handle caching in one go.
4647
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer

.github/workflows/quicktest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
strategy:
9696
matrix:
9797
php: ['5.4', 'latest']
98-
phpcs_version: ['3.1.0', 'dev-master']
98+
phpcs_version: ['3.1.0', '3.x-dev']
9999

100100
include:
101101
- php: '7.2'
@@ -114,7 +114,7 @@ jobs:
114114
- name: Setup ini config
115115
id: set_ini
116116
run: |
117-
if [ "${{ startsWith( matrix.phpcs_version, 'dev-' ) || endsWith( matrix.phpcs_version, '-dev' ) }}" == "true" ]; then
117+
if [ "${{ endsWith( matrix.phpcs_version, '-dev' ) }}" == "true" ]; then
118118
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On' >> "$GITHUB_OUTPUT"
119119
else
120120
echo 'PHP_INI=error_reporting=-1, display_errors=On' >> "$GITHUB_OUTPUT"

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,34 +113,34 @@ jobs:
113113
#
114114
# Additionally, PHPCS 4.x has a minimum version requirement of PHP 7.2.
115115
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
116-
phpcs_version: ['dev-master', '4.0.0', '4.x-dev']
116+
phpcs_version: ['3.x-dev', '4.0.0', '4.x-dev']
117117

118118
include:
119119
# Complete the matrix, while preventing issues with PHPCS versions incompatible with certain PHP versions.
120120
- php: '5.4'
121121
phpcs_version: '3.1.0'
122122
- php: '5.4'
123-
phpcs_version: 'dev-master'
123+
phpcs_version: '3.x-dev'
124124

125125
- php: '5.5'
126126
phpcs_version: '3.1.0'
127127
- php: '5.5'
128-
phpcs_version: 'dev-master'
128+
phpcs_version: '3.x-dev'
129129

130130
- php: '5.6'
131131
phpcs_version: '3.1.0'
132132
- php: '5.6'
133-
phpcs_version: 'dev-master'
133+
phpcs_version: '3.x-dev'
134134

135135
- php: '7.0'
136136
phpcs_version: '3.1.0'
137137
- php: '7.0'
138-
phpcs_version: 'dev-master'
138+
phpcs_version: '3.x-dev'
139139

140140
- php: '7.1'
141141
phpcs_version: '3.1.0'
142142
- php: '7.1'
143-
phpcs_version: 'dev-master'
143+
phpcs_version: '3.x-dev'
144144

145145
- php: '7.2'
146146
phpcs_version: '3.1.0'
@@ -172,7 +172,7 @@ jobs:
172172
run: |
173173
# On stable PHPCS versions, allow for PHP deprecation notices.
174174
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
175-
if [ "${{ startsWith( matrix.phpcs_version, 'dev-' ) || endsWith( matrix.phpcs_version, '-dev' ) }}" == "true" ]; then
175+
if [ "${{ endsWith( matrix.phpcs_version, '-dev' ) }}" == "true" ]; then
176176
echo 'PHP_INI=error_reporting=E_ALL & ~E_DEPRECATED, display_errors=On' >> "$GITHUB_OUTPUT"
177177
else
178178
echo 'PHP_INI=error_reporting=-1, display_errors=On' >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)