From 96945aebea9638c967ef7e81c1518f468fc5c08f Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 19 Nov 2024 23:23:36 +0900 Subject: [PATCH] Add bin command and update tool paths in composer.json Added a placeholder bin command to indicate no binary is installed. Updated paths for PHP tools (phpcs, phpcbf, phpstan, etc.) to use vendor-bin/tools directory for improved dependency management and organization. --- composer.json | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 7ab47c0..92b330f 100644 --- a/composer.json +++ b/composer.json @@ -37,23 +37,30 @@ "bamarni/composer-bin-plugin": "^1.4" }, "scripts" :{ + "bin": "echo 'no bin' installed.", "post-install-cmd": ["@composer bin all install --ansi"], "post-update-cmd": ["@composer bin all update --ansi"], "test": ["./vendor/bin/phpunit"], "tests": ["@cs", "@sa", "@test"], "coverage": ["php -dzend_extension=xdebug.so -dxdebug.mode=coverage ./vendor/bin/phpunit --coverage-text --coverage-html=build/coverage"], "pcov": ["php -dextension=pcov.so -d pcov.enabled=1 ./vendor/bin/phpunit --coverage-text --coverage-html=build/coverage --coverage-clover=coverage.xml"], - "cs": ["./vendor/bin/phpcs"], - "cs-fix": ["./vendor/bin/phpcbf src tests"], - "clean": ["./vendor/bin/phpstan clear-result-cache", "./vendor/bin/psalm --clear-cache", "rm -rf tests/tmp/*.php"], - "sa": ["./vendor/bin/phpstan analyse -c phpstan.neon", "psalm --show-info=true"], - "metrics": ["./vendor/bin/phpmetrics --report-html=build/metrics --exclude=Exception --junit=build/junit.xml src"], - "phpmd": ["./vendor/bin/phpmd --exclude src/Annotation src text ./phpmd.xml"], + "cs": ["./vendor-bin/tools/vendor/bin/phpcs"], + "cs-fix": ["./vendor-bin/tools/vendor/bin/phpcbf src tests"], + "clean": ["./vendor-bin/tools/vendor/bin/phpstan clear-result-cache", "./vendor-bin/tools/vendor/bin/psalm --clear-cache", "rm -rf tests/tmp/*.php"], + "sa": ["./vendor-bin/tools/vendor/bin/phpstan analyse -c phpstan.neon", "psalm --show-info=true"], + "metrics": ["./vendor-bin/tools/vendor/bin/phpmetrics --report-html=build/metrics --exclude=Exception --junit=build/junit.xml src"], + "phpmd": ["./vendor-bin/tools/vendor/bin/phpmd --exclude src/Annotation src text ./phpmd.xml"], "build": ["@cs", "@sa", "@pcov", "@metrics"] }, "config": { "allow-plugins": { "bamarni/composer-bin-plugin": true } + }, + "extra": { + "bamarni-bin": { + "bin-links": false, + "forward-command": true + } } }