Skip to content

Commit c085daa

Browse files
author
ityaozm@gmail.com
committed
build(composer): Add new dependencies and update configuration
- Add "$schema" reference to box.json for schema validation - Include new dev dependencies: "buggregator/trap" and "dereuromark/composer-prefer-lowest" - Update existing commands in composer.json for better validation and checks - Create new composer.json files for nativephp and phpacker vendor-bin packages for organization
1 parent cfc54ca commit c085daa

7 files changed

Lines changed: 486 additions & 56 deletions

File tree

box.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/box-project/box/refs/heads/main/res/schema.json",
23
"chmod": "0755",
34
"directories": [
45
"app",

composer.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
"require-dev": {
6868
"bamarni/composer-bin-plugin": "^1.8",
6969
"brainmaestro/composer-git-hooks": "^3.0",
70+
"buggregator/trap": "^1.13",
71+
"dereuromark/composer-prefer-lowest": "^0.1",
7072
"dg/bypass-finals": "^1.9",
7173
"driftingly/rector-laravel": "^2.0",
7274
"ergebnis/composer-normalize": "^2.47",
@@ -212,6 +214,7 @@
212214
"@md-lint",
213215
"@readme-lint",
214216
"@yaml-lint",
217+
"@composer-validate-prefer-lowest",
215218
"@phpmnd",
216219
"@style-lint",
217220
"@sk-check-conflicts",
@@ -227,7 +230,7 @@
227230
],
228231
"checks-parallel": "@composer-parallel composer-validate md-lint lint style-lint test psalm",
229232
"class-leak": "@php vendor/bin/class-leak --ansi -v",
230-
"class-leak-check": "@class-leak check config src --skip-suffix=Pipe --skip-path=Support/Traits --skip-path=Channels --skip-type=\\Guanguans\\LaravelExceptionNotify\\Contracts\\Channel --skip-type=\\Guanguans\\LaravelExceptionNotify\\Contracts\\Collector --skip-type=Rector\\Rector\\AbstractRector",
233+
"class-leak-check": "@class-leak check app/ config/ --skip-suffix=Pipe --skip-path=Support/Traits --skip-path=Channels --skip-type=\\Guanguans\\LaravelExceptionNotify\\Contracts\\Channel --skip-type=\\Guanguans\\LaravelExceptionNotify\\Contracts\\Collector --skip-type=Rector\\Rector\\AbstractRector",
231234
"composer-audit": "@composer audit --ansi -v",
232235
"composer-bin-all-update": "@composer bin all update --ansi -v",
233236
"composer-check-platform-reqs": "@composer check-platform-reqs --lock --ansi -v",
@@ -247,6 +250,7 @@
247250
"composer-updater-dry-run": "@composer-updater --dry-run",
248251
"composer-updater-php-cs-fixer-config": "@composer-updater --composer-json-path=vendor-bin/php-cs-fixer-config/composer.json",
249252
"composer-validate": "@composer validate --check-lock --strict --ansi -v",
253+
"composer-validate-prefer-lowest": "@php vendor/dereuromark/composer-prefer-lowest/bin/validate-prefer-lowest.php --majors-only",
250254
"composer-vendor-patches": "@php vendor/bin/vendor-patches generate --ansi -v",
251255
"doctum": "@php vendor/bin/doctum.php update doctum.php --ansi -v",
252256
"env-put-composer-memory-unlimited": "@putenv COMPOSER_MEMORY_LIMIT=-1",
@@ -284,7 +288,7 @@
284288
"lint": [
285289
"@env-put-php",
286290
"for DIR in .; do find $DIR -maxdepth 1 -type f -name '*.php' -type f ! -name 'xxx.php' -exec $PHP82 -l {} \\; 2>&1 | (! grep -v '^No syntax errors detected'); done",
287-
"for DIR in app bootstrap config resources tests; do find $DIR -type f -name '*.php' -type f ! -name 'xxx.php' -exec $PHP82 -l {} \\; 2>&1 | (! grep -v '^No syntax errors detected'); done"
291+
"for DIR in app/ bootstrap/ config/ resources/ tests/; do find $DIR -type f -name '*.php' -type f ! -name 'xxx.php' -exec $PHP82 -l {} \\; 2>&1 | (! grep -v '^No syntax errors detected'); done"
288292
],
289293
"mark-finish": "printf '\\n!\\n!\\t\\033[0;32m%s\\033[0m\\n!\\n\\n' \"Finished\"",
290294
"mark-separate": "printf '\\n!\\n!\\t\\033[0;33m%s\\033[0m\\n!\\n\\n' \"----------------\"",
@@ -294,7 +298,7 @@
294298
"neon-lint": "@php vendor/bin/neon-lint *.neon",
295299
"normalized": "@composer normalize --diff --ansi -v",
296300
"normalized-dry-run": "@normalized --dry-run",
297-
"peck": "/opt/homebrew/opt/php@8.3/bin/php vendor/bin/peck check --path=src/ --config=peck.json --ansi -v",
301+
"peck": "/opt/homebrew/opt/php@8.3/bin/php vendor/bin/peck check --path=app/ --config=peck.json --ansi -v",
298302
"peck-init": "@peck --init",
299303
"pest": "@php vendor/bin/pest --colors=always --min=80 --coverage",
300304
"pest-bail": "@pest --bail",
@@ -310,10 +314,10 @@
310314
"pest-type-coverage": "@pest --type-coverage",
311315
"pest-update-snapshots": "@pest -d --update-snapshots",
312316
"phparkitect": "@php vendor/bin/phparkitect check --ansi -v",
313-
"phploc": "@php vendor/bin/phploc --suffix=php src/",
314-
"phpmd": "@php vendor/bin/phpmd src/ ansi cleancode,codesize,controversial,design,naming,unusedcode --suffixes=php",
315-
"phpmetrics": "@php vendor/bin/phpmetrics --report-html=.build/phpmetrics/ src/",
316-
"phpmnd": "@php vendor/bin/phpmnd src --exclude-path=Support/helpers.php --ignore-numbers=2,-1 --hint --progress --ansi -v",
317+
"phploc": "@php vendor/bin/phploc --suffix=php app/",
318+
"phpmd": "@php vendor/bin/phpmd app/ ansi cleancode,codesize,controversial,design,naming,unusedcode --suffixes=php",
319+
"phpmetrics": "@php vendor/bin/phpmetrics --report-html=.build/phpmetrics/ app/",
320+
"phpmnd": "@php vendor/bin/phpmnd app/ --exclude-path=Support/helpers.php --ignore-numbers=2,-1 --hint --progress --ansi -v",
317321
"phpstan": "@php vendor/bin/phpstan analyse --ansi -v",
318322
"phpstan-baseline": "@phpstan --generate-baseline --allow-empty-baseline",
319323
"phpstan-split-baseline": [

0 commit comments

Comments
 (0)