Skip to content

Commit

Permalink
[TASK] Drop PHP_CodeSniffer
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
oliverklee committed Feb 13, 2024
1 parent 24be92d commit d2cf35a
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 158 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/.phive/ export-ignore
/CODE_OF_CONDUCT.md export-ignore
/config/ export-ignore
/phpcs.xml export-ignore
/phpunit.xml export-ignore
/psalm.baseline.xml export-ignore
/psalm.xml export-ignore
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ jobs:
- fixer
- md
- psalm
- sniff
php-version:
- '8.2'

Expand Down Expand Up @@ -159,7 +158,7 @@ jobs:
run: composer install --no-progress

- name: Install development tools
run: phive --no-progress install --trust-gpg-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13,BBAB5DF0A0D6672989CF1869E82B2FB314E9906E,A972B9ABB95D0B760B51442231C7E470E2138192,9882DD2B38813C08EA651B69A4E55EA12C7C085C,2DE50EB60C013FFFA831040D12CE0F1D262429A5
run: phive --no-progress install --trust-gpg-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13,BBAB5DF0A0D6672989CF1869E82B2FB314E9906E

- name: Run Command
run: composer ci:php:${{ matrix.command }}
Expand Down
1 change: 0 additions & 1 deletion .phive/phars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<phive xmlns="https://phar.io/phive">
<phar name="composer-normalize" version="^2.36.0" installed="2.36.0" location="./.phive/composer-normalize" copy="false"/>
<phar name="php-cs-fixer" version="^3.26.1" installed="3.26.1" location="./.phive/php-cs-fixer" copy="false"/>
<phar name="phpcs" version="^3.7.2" installed="3.7.2" location="./.phive/phpcs" copy="false"/>
<phar name="phpmd" version="^2.13.0" installed="2.13.0" location="./.phive/phpmd" copy="false"/>
<phar name="psalm" version="^5.15.0" installed="5.15.0" location="./.phive/psalm" copy="false"/>
</phive>
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,9 @@
"ci:php:lint": "\"./vendor/bin/parallel-lint\" config src tests",
"ci:php:md": "\"./.phive/phpmd\" src text config/phpmd.xml",
"ci:php:psalm": "\"./.phive/psalm\" --show-info=false",
"ci:php:sniff": "\"./.phive/phpcs\" config src tests",
"ci:static": [
"@ci:composer:normalize",
"@ci:php:lint",
"@ci:php:sniff",
"@ci:php:fixer",
"@ci:php:md",
"@ci:php:psalm"
Expand All @@ -111,7 +109,6 @@
"ci:php:lint": "Lints the PHP files for syntax errors.",
"ci:php:md": "Checks the code complexity with PHPMD.",
"ci:php:psalm": "Checks the types with Psalm.",
"ci:php:sniff": "Checks the code style with PHP_CodeSniffer.",
"ci:static": "Runs all static code analysis checks for the code and the composer.json.",
"ci:tests": "Runs all dynamic tests (i.e., currently, the unit tests).",
"ci:tests:sof": "Runs the unit tests and stops at the first failure.",
Expand Down
151 changes: 0 additions & 151 deletions phpcs.xml

This file was deleted.

0 comments on commit d2cf35a

Please sign in to comment.