|
25 | 25 | "spatie/laravel-enum": "^2.2" |
26 | 26 | }, |
27 | 27 | "require-dev": { |
28 | | - "spatie/data-transfer-object": "^3.1", |
29 | | - "orchestra/testbench": "^6.0", |
30 | | - "phpunit/phpunit": "^9.4", |
| 28 | + "brainmaestro/composer-git-hooks": "^2.8", |
31 | 29 | "friendsofphp/php-cs-fixer": "^3.1", |
32 | 30 | "nunomaduro/larastan": "^0.7.12 || ^1.0.0", |
33 | | - "nunomaduro/phpinsights": "^2.0" |
| 31 | + "nunomaduro/phpinsights": "^2.0", |
| 32 | + "orchestra/testbench": "^6.0", |
| 33 | + "phpunit/phpunit": "^9.4", |
| 34 | + "spatie/data-transfer-object": "^3.1", |
| 35 | + "spatie/x-ray": "^1.1" |
34 | 36 | }, |
35 | 37 | "autoload": { |
36 | 38 | "psr-4": { |
|
47 | 49 | "test-coverage": "vendor/bin/phpunit --coverage-html coverage", |
48 | 50 | "cs": "vendor/bin/php-cs-fixer fix", |
49 | 51 | "insights": "vendor/bin/phpinsights", |
50 | | - "stan": "vendor/bin/phpstan analyse" |
| 52 | + "stan": "vendor/bin/phpstan analyse", |
| 53 | + "cghooks": "vendor/bin/cghooks", |
| 54 | + "xray": "vendor/bin/x-ray src" |
51 | 55 | }, |
52 | 56 | "config": { |
53 | 57 | "sort-packages": true |
|
60 | 64 | "aliases": { |
61 | 65 | "ApiClient": "Grixu\\ApiClient\\ApiClientFacade" |
62 | 66 | } |
| 67 | + }, |
| 68 | + "hooks": { |
| 69 | + "config": { |
| 70 | + "stop-on-failure": ["pre-commit", "commit-msg"] |
| 71 | + }, |
| 72 | + "pre-commit": [ |
| 73 | + "export PATH=\"/usr/local/homebrew/bin:$PATH\"", |
| 74 | + "./vendor/bin/x-ray src", |
| 75 | + "./vendor/bin/php-cs-fixer fix" |
| 76 | + ], |
| 77 | + "commit-msg": "grep -E '^((feat|chore|docs|refactor|fix){1}\\:{1}\\s{1}[a-z]{1}|Merge branch).*' $1", |
| 78 | + "post-merge": [ |
| 79 | + "export PATH=\"/usr/local/homebrew/bin:$PATH\"", |
| 80 | + "composer install" |
| 81 | + ] |
63 | 82 | } |
64 | 83 | } |
65 | 84 | } |
0 commit comments