Skip to content

Commit f391f76

Browse files
author
ityaozm@gmail.com
committed
ci(dependencies): Add PHP CodeSniffer and PHP Compatibility tools
- Add "dealerdirect/phpcodesniffer-composer-installer" as a dependency. - Add "phpcompatibility/php-compatibility" for PHP version compatibility checks. - Enable "dealerdirect/phpcodesniffer-composer-installer" in the allow-plugins configuration. - Introduce new PHP CodeSniffer commands for easier code quality checks. This change enhances the project’s code quality tools by integrating PHP CodeSniffer and PHP Compatibility. These tools will help ensure coding standards and compatibility with different PHP versions, improving overall maintainability.
1 parent 1c05911 commit f391f76

2 files changed

Lines changed: 232 additions & 1 deletion

File tree

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"bamarni/composer-bin-plugin": "^1.8",
6969
"brainmaestro/composer-git-hooks": "^3.0",
7070
"buggregator/trap": "^1.13",
71+
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
7172
"dereuromark/composer-prefer-lowest": "^0.1",
7273
"dg/bypass-finals": "^1.9",
7374
"driftingly/rector-laravel": "^2.0",
@@ -89,6 +90,7 @@
8990
"pestphp/pest": "^3.8",
9091
"pestphp/pest-plugin-laravel": "^3.2",
9192
"php-mock/php-mock-phpunit": "^2.13",
93+
"phpcompatibility/php-compatibility": "^9.3",
9294
"phpstan/extension-installer": "^1.4",
9395
"phpstan/phpstan": "^2.1",
9496
"phpstan/phpstan-deprecation-rules": "^2.0",
@@ -144,6 +146,7 @@
144146
"config": {
145147
"allow-plugins": {
146148
"bamarni/composer-bin-plugin": true,
149+
"dealerdirect/phpcodesniffer-composer-installer": true,
147150
"ergebnis/composer-normalize": true,
148151
"ion-bazan/composer-diff": true,
149152
"pestphp/pest-plugin": true,
@@ -321,6 +324,10 @@
321324
"pest-type-coverage": "@pest --type-coverage",
322325
"pest-update-snapshots": "@pest -d --update-snapshots",
323326
"phparkitect": "@php vendor/bin/phparkitect check --ansi -v",
327+
"phpcs": "@php vendor/bin/phpcs app/ bootstrap/ config/ resources/ tests/ --extensions=php --ignore=*/vendor/* --parallel=8 --cache --colors -n -p -s -v",
328+
"phpcs:compatibility": "@phpcs --standard=PHPCompatibility --exclude=PHPCompatibility.FunctionDeclarations.NewClosure --runtime-set testVersion 8.2-",
329+
"phpcs:help": "@phpcs --help",
330+
"phpcs:i": "@phpcs -i",
324331
"phploc": "@php vendor/bin/phploc --suffix=php app/",
325332
"phpmd": "@php vendor/bin/phpmd app/ ansi cleancode,codesize,controversial,design,naming,unusedcode --suffixes=php",
326333
"phpmetrics": "@php vendor/bin/phpmetrics --report-html=.build/phpmetrics/ app/",

composer.lock

Lines changed: 225 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)