Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 361d55e

Browse files
committed
feat: added hooks & x-ray
1 parent 05bf160 commit 361d55e

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

composer.json

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@
2525
"spatie/laravel-enum": "^2.2"
2626
},
2727
"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",
3129
"friendsofphp/php-cs-fixer": "^3.1",
3230
"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"
3436
},
3537
"autoload": {
3638
"psr-4": {
@@ -47,7 +49,9 @@
4749
"test-coverage": "vendor/bin/phpunit --coverage-html coverage",
4850
"cs": "vendor/bin/php-cs-fixer fix",
4951
"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"
5155
},
5256
"config": {
5357
"sort-packages": true
@@ -60,6 +64,21 @@
6064
"aliases": {
6165
"ApiClient": "Grixu\\ApiClient\\ApiClientFacade"
6266
}
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+
]
6382
}
6483
}
6584
}

0 commit comments

Comments
 (0)