Skip to content

Commit

Permalink
[TASK] Drop PHP_CodeSniffer
Browse files Browse the repository at this point in the history
The GPG keys used to sign the PHARs are no longer available,
which breaks installation of PHP_CodeSniffer (and its fixer),
which breaks the build.

In `main`, we already dropped the tool in #468.
  • Loading branch information
oliverklee committed Jan 27, 2025
1 parent 6f37a7a commit cc19445
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 29 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ jobs:
fail-fast: false
matrix:
include:
- command: sniffer
php-version: '7.4'
- command: fixer
php-version: '7.4'
- command: stan
Expand Down Expand Up @@ -121,7 +119,7 @@ jobs:
- name: Install development tools
run: |
phive --no-progress install --trust-gpg-keys 0FDE18AE1D09E19F60F6B1CBC00543248C87FB13,BBAB5DF0A0D6672989CF1869E82B2FB314E9906E,689DAD778FF08760E046228BA978220305CD5C32,CA7C2C7A30C8E8E1274A847651C67305FFC2E5C0
phive --no-progress install --trust-gpg-keys BBAB5DF0A0D6672989CF1869E82B2FB314E9906E,CA7C2C7A30C8E8E1274A847651C67305FFC2E5C0
- name: Run Command
run: composer ci:php:${{ matrix.command }}
2 changes: 0 additions & 2 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="php-cs-fixer" version="^3.13.2" installed="3.68.1" location="./.phive/php-cs-fixer.phar" copy="false"/>
<phar name="phpcbf" version="^3.7.1" installed="3.11.2" location="./.phive/phpcbf.phar" copy="false"/>
<phar name="phpcs" version="^3.7.1" installed="3.11.2" location="./.phive/phpcs.phar" copy="false"/>
<phar name="phpstan" version="^1.9.14" installed="1.12.15" location="./.phive/phpstan.phar" copy="false"/>
</phive>
8 changes: 1 addition & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,24 @@
"@ci:static"
],
"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",
"ci:php:sniffer": "@php ./.phive/phpcs.phar --standard=config/phpcs.xml bin src tests",
"ci:php:stan": "@php ./.phive/phpstan.phar --configuration=config/phpstan.neon",
"ci:static": [
"@ci:php:fixer",
"@ci:php:sniffer",
"@ci:php:stan"
],
"fix:php": [
"@fix:php:fixer",
"@fix:php:sniffer"
"@fix:php:fixer"
],
"fix:php:fixer": "@php ./.phive/php-cs-fixer.phar --config=config/php-cs-fixer.php fix bin src tests",
"fix:php:sniffer": "@php ./.phive/phpcbf.phar --standard=config/phpcs.xml bin src tests",
"phpstan:baseline": "@php ./.phive/phpstan.phar --configuration=config/phpstan.neon --generate-baseline=config/phpstan-baseline.neon"
},
"scripts-descriptions": {
"ci": "Runs all dynamic and static code checks (i.e. currently, only the static checks).",
"ci:php:fixer": "Checks the code style with PHP CS Fixer.",
"ci:php:sniffer": "Checks the code style with PHP_CodeSniffer.",
"ci:php:stan": "Checks the types with PHPStan.",
"ci:static": "Runs all static code analysis checks for the code.",
"fix:php": "Autofixes all autofixable issues in the PHP code.",
"fix:php:fixer": "Fixes autofixable issues found by PHP CS Fixer.",
"fix:php:sniffer": "Fixes autofixable issues found by PHP_CodeSniffer.",
"phpstand:baseline": "Updates the PHPStan baseline file to match the code."
}
}
17 changes: 0 additions & 17 deletions config/phpcs.xml

This file was deleted.

0 comments on commit cc19445

Please sign in to comment.