Skip to content

Commit a36e2d6

Browse files
authored
Merge pull request #287 from PHPCSStandards/feature/ghactions-various-tweaks
GH Actions: various tweaks
2 parents 8b59c9d + eb325bd commit a36e2d6

File tree

5 files changed

+25
-19
lines changed

5 files changed

+25
-19
lines changed

.github/workflows/basics.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
composer require --no-update squizlabs/php_codesniffer:"dev-master" --no-interaction
4949
5050
# Install dependencies and handle caching in one go.
51-
# @link https://github.com/marketplace/actions/install-composer-dependencies
51+
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
5252
- name: Install Composer dependencies
5353
uses: "ramsey/composer-install@v2"
5454
with:
@@ -62,7 +62,8 @@ jobs:
6262
6363
# Show XML violations inline in the file diff.
6464
# @link https://github.com/marketplace/actions/xmllint-problem-matcher
65-
- uses: korelstar/xmllint-problem-matcher@v1
65+
- name: Enable showing XML issues inline
66+
uses: korelstar/xmllint-problem-matcher@v1
6667

6768
# Validate the Ruleset XML file.
6869
# @link http://xmlsoft.org/xmllint.html
@@ -112,7 +113,7 @@ jobs:
112113

113114
# Install dependencies and handle caching in one go.
114115
# Dependencies need to be installed to make sure the PHPCS and PHPUnit classes are recognized.
115-
# @link https://github.com/marketplace/actions/install-composer-dependencies
116+
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
116117
- name: Install Composer dependencies
117118
uses: "ramsey/composer-install@v2"
118119
with:

.github/workflows/quicktest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
run: composer require squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-update --no-scripts --no-interaction
6161

6262
# Install dependencies and handle caching in one go.
63-
# @link https://github.com/marketplace/actions/install-composer-dependencies
63+
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
6464
- name: Install Composer dependencies - normal
6565
if: matrix.php != 'latest'
6666
uses: "ramsey/composer-install@v2"

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
run: composer require squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-update --no-scripts --no-interaction
6767

6868
# Install dependencies and handle caching in one go.
69-
# @link https://github.com/marketplace/actions/install-composer-dependencies
69+
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
7070
- name: Install Composer dependencies - normal
7171
if: ${{ startsWith( matrix.php, '8' ) == false }}
7272
uses: "ramsey/composer-install@v2"
@@ -148,7 +148,7 @@ jobs:
148148
run: composer require squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-update --no-scripts --no-interaction
149149

150150
# Install dependencies and handle caching in one go.
151-
# @link https://github.com/marketplace/actions/install-composer-dependencies
151+
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
152152
- name: Install Composer dependencies
153153
uses: "ramsey/composer-install@v2"
154154
with:

.yamllint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ yaml-files:
66
- '*.yaml'
77
- '*.yml'
88
- '.yamllint'
9+
- 'phpstan.neon*'
910

1011
# Rule documentation: https://yamllint.readthedocs.io/en/stable/rules.html
1112
rules:

phpstan.neon.dist

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
parameters:
2-
#phpVersion: 50400 # Needs to be 70100 or higher... sigh...
2+
# phpVersion: 50400 # Needs to be 70100 or higher... sigh...
33
level: 6
44
paths:
55
- Modernize
@@ -10,6 +10,8 @@ parameters:
1010
treatPhpDocTypesAsCertain: false
1111

1212
ignoreErrors:
13+
# yamllint disable rule:line-length
14+
1315
# Level 1
1416
# Keep to stay in line with parent class.
1517
-
@@ -22,21 +24,21 @@ parameters:
2224
-
2325
message: '`^Property \S+Sniff::\$(phpVersion|tabWidth) \(int\) in isset\(\) is not nullable\.$`'
2426
paths:
25-
- Modernize\Sniffs\FunctionCalls\DirnameSniff.php
26-
- Universal\Sniffs\Arrays\DuplicateArrayKeySniff.php
27-
- Universal\Sniffs\CodeAnalysis\ConstructorDestructorReturnSniff.php
28-
- Universal\Sniffs\WhiteSpace\CommaSpacingSniff.php
29-
- Universal\Sniffs\WhiteSpace\DisallowInlineTabsSniff.php
30-
- Universal\Sniffs\WhiteSpace\PrecisionAlignmentSniff.php
27+
- Modernize\Sniffs\FunctionCalls\DirnameSniff.php
28+
- Universal\Sniffs\Arrays\DuplicateArrayKeySniff.php
29+
- Universal\Sniffs\CodeAnalysis\ConstructorDestructorReturnSniff.php
30+
- Universal\Sniffs\WhiteSpace\CommaSpacingSniff.php
31+
- Universal\Sniffs\WhiteSpace\DisallowInlineTabsSniff.php
32+
- Universal\Sniffs\WhiteSpace\PrecisionAlignmentSniff.php
3133
-
3234
message: '`^Strict comparison using === between true and false will always evaluate to false\.$`'
3335
paths:
34-
- Modernize\Sniffs\FunctionCalls\DirnameSniff.php
35-
- Universal\Sniffs\Arrays\DuplicateArrayKeySniff.php
36-
- Universal\Sniffs\CodeAnalysis\ConstructorDestructorReturnSniff.php
37-
- Universal\Sniffs\WhiteSpace\CommaSpacingSniff.php
38-
- Universal\Sniffs\WhiteSpace\DisallowInlineTabsSniff.php
39-
- Universal\Sniffs\WhiteSpace\PrecisionAlignmentSniff.php
36+
- Modernize\Sniffs\FunctionCalls\DirnameSniff.php
37+
- Universal\Sniffs\Arrays\DuplicateArrayKeySniff.php
38+
- Universal\Sniffs\CodeAnalysis\ConstructorDestructorReturnSniff.php
39+
- Universal\Sniffs\WhiteSpace\CommaSpacingSniff.php
40+
- Universal\Sniffs\WhiteSpace\DisallowInlineTabsSniff.php
41+
- Universal\Sniffs\WhiteSpace\PrecisionAlignmentSniff.php
4042
-
4143
message: '`^Property PHPCSExtra\\Universal\\Sniffs\\Arrays\\DuplicateArrayKeySniff\:\:\$currentMaxIntKey[GL]t8 \(int\) in isset\(\) is not nullable\.$`'
4244
path: Universal\Sniffs\Arrays\DuplicateArrayKeySniff.php
@@ -50,3 +52,5 @@ parameters:
5052
# We're not using strict types, so this will be juggled without any issues.
5153
- '#^Parameter \#3 \$value of method \S+File::recordMetric\(\) expects string, \(?(float|int|bool)(<[^>]+>)?(\|(float|int|bool)(<[^>]+>)?)*\)? given\.$#'
5254
- '#^Parameter \#2 \$content of method \S+Fixer::replaceToken\(\) expects string, \(?(float|int|bool)(<[^>]+>)?(\|(float|int|bool)(<[^>]+>)?)*\)? given\.$#'
55+
56+
# yamllint enable rule:line-length

0 commit comments

Comments
 (0)