Skip to content

Commit daa3ad0

Browse files
committed
[TASK] Drop PHP_CodeSniffer
This tool is not well-maintained anymore, and it has no PER2 coding standard, which is a blocker for us moving to PER2. PHP-CS-Fixer already has a PER2 coding standard. If we use PHP-CS-Fixer on PER2 and PHP_CodeSniffer on PSR12 (the latest available standard there), both tools would keep overwriting each other's changes endlessly, and they would never agree on the correct formatting.
1 parent 52ff901 commit daa3ad0

File tree

4 files changed

+1
-27
lines changed

4 files changed

+1
-27
lines changed

.github/workflows/ci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ jobs:
8585
fail-fast: false
8686
matrix:
8787
command:
88-
- sniffer
8988
- fixer
9089
- stan
9190
php-version:

.phive/phars.xml

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
33
<phar name="php-cs-fixer" version="^3.49.0" installed="3.49.0" location="./.phive/php-cs-fixer.phar" copy="false"/>
4-
<phar name="phpcbf" version="^3.8.1" installed="3.8.1" location="./.phive/phpcbf.phar" copy="false"/>
5-
<phar name="phpcs" version="^3.8.1" installed="3.8.1" location="./.phive/phpcs.phar" copy="false"/>
64
</phive>

composer.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -65,30 +65,24 @@
6565
"@ci:static"
6666
],
6767
"ci:php:fixer": "@php ./.phive/php-cs-fixer.phar --config=config/php-cs-fixer.php fix --dry-run -v --show-progress=dots bin src tests",
68-
"ci:php:sniffer": "@php ./.phive/phpcs.phar --standard=config/phpcs.xml bin src tests",
6968
"ci:php:stan": "phpstan --no-progress --configuration=config/phpstan.neon",
7069
"ci:static": [
7170
"@ci:php:fixer",
72-
"@ci:php:sniffer",
7371
"@ci:php:stan"
7472
],
7573
"fix:php": [
76-
"@fix:php:fixer",
77-
"@fix:php:sniffer"
74+
"@fix:php:fixer"
7875
],
7976
"fix:php:fixer": "@php ./.phive/php-cs-fixer.phar --config=config/php-cs-fixer.php fix bin src tests",
80-
"fix:php:sniffer": "@php ./.phive/phpcbf.phar --standard=config/phpcs.xml bin src tests",
8177
"phpstan:baseline": "phpstan --configuration=config/phpstan.neon --generate-baseline=config/phpstan-baseline.neon"
8278
},
8379
"scripts-descriptions": {
8480
"ci": "Runs all dynamic and static code checks (i.e. currently, only the static checks).",
8581
"ci:php:fixer": "Checks the code style with PHP CS Fixer.",
86-
"ci:php:sniffer": "Checks the code style with PHP_CodeSniffer.",
8782
"ci:php:stan": "Checks the types with PHPStan.",
8883
"ci:static": "Runs all static code analysis checks for the code.",
8984
"fix:php": "Autofixes all autofixable issues in the PHP code.",
9085
"fix:php:fixer": "Fixes autofixable issues found by PHP CS Fixer.",
91-
"fix:php:sniffer": "Fixes autofixable issues found by PHP_CodeSniffer.",
9286
"phpstand:baseline": "Updates the PHPStan baseline file to match the code."
9387
}
9488
}

config/phpcs.xml

-17
This file was deleted.

0 commit comments

Comments
 (0)