Skip to content

Commit e2eeb95

Browse files
committed
Composer: update to PHPCSDevCS 1.2.0
PHPCSDevCS allows for PHPCS 4.0 and includes PHPCompatibility 10.0.0-alpha1 and a range of sniffs from PHPCSExtra. This also means that we can now scan files without a file extension (if explicitly requested), so the `bin` script can now be scanned. Includes minor documentation update in the ruleset and some small CS fixes. Refs: * https://github.com/PHPCSStandards/PHPCSDevCS/releases/tag/1.2.0 * squizlabs/PHP_CodeSniffer 2916 * PHPCSStandards/PHP_CodeSniffer 1022
1 parent 452a93b commit e2eeb95

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Tests/IOTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ protected function executeCliCommand($command, $workingDir = null)
4747
}
4848

4949
$descriptorspec = [
50-
0 => ['pipe', 'r'], // stdin
51-
1 => ['pipe', 'w'], // stdout
52-
2 => ['pipe', 'w'], // stderr
50+
0 => ['pipe', 'r'], // stdin
51+
1 => ['pipe', 'w'], // stdout
52+
2 => ['pipe', 'w'], // stderr
5353
];
5454

5555
$options = null;

bin/phpcs-check-feature-completeness

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
* @link https://github.com/PHPCSStandards/PHPCSDevTools
3232
*/
3333

34-
if (is_file(__DIR__.'/../autoload.php') === true) {
34+
if (is_file(__DIR__ . '/../autoload.php') === true) {
3535
// Installed via Composer.
36-
require_once __DIR__.'/../autoload.php';
36+
require_once __DIR__ . '/../autoload.php';
3737
} else {
3838
// Presume git clone.
3939
require_once __DIR__ . '/../Scripts/FileList.php';

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"phpunit/phpunit" : "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.5.32 || ^11.3.3",
3232
"php-parallel-lint/php-parallel-lint": "^1.4.0",
3333
"php-parallel-lint/php-console-highlighter": "^1.0.0",
34-
"phpcsstandards/phpcsdevcs": "^1.1.6",
34+
"phpcsstandards/phpcsdevcs": "^1.2.0",
3535
"phpcsstandards/phpcsutils" : "^1.0",
3636
"yoast/phpunit-polyfills": "^1.1 || ^2.0 || ^3.0"
3737
},

phpcs.xml.dist

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
-->
1111

1212
<file>.</file>
13+
<file>./bin/phpcs-check-feature-completeness</file>
1314

1415
<!-- Exclude Composer vendor directory. -->
1516
<exclude-pattern>*/vendor/*</exclude-pattern>
@@ -33,12 +34,11 @@
3334
-->
3435

3536
<rule ref="PHPCSDev">
36-
<!-- Allow for the file docblock on the line directly following the PHP open tag.
37-
As the sniff in PHPCS does not use modular error codes (yet - see PR #2729),
38-
the complete error code needs to be disabled, not just the bit involving
39-
the file docblocks.
40-
-->
37+
<!-- Only needed for PHPCS 3.x. This exclusion can be removed when PHPCSDevCS drops support for PHPCS 3.x. -->
4138
<exclude name="PSR12.Files.FileHeader.SpacingAfterBlock"/>
39+
40+
<!-- Temporary exclude. Changing pre-existing classes to final can only be done in a major release. -->
41+
<exclude name="Universal.Classes.RequireFinalClass"/>
4242
</rule>
4343

4444
<!-- Set minimum PHP version supported to PHP 5.4. -->

0 commit comments

Comments
 (0)