Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 274e546

Browse files
committed
Replace CaptainHook with Lefthook
1 parent 7063269 commit 274e546

5 files changed

Lines changed: 84 additions & 334 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ jobs:
4444
- name: Check composer.json normalization
4545
run: composer normalize --diff --dry-run
4646

47+
- name: Check README examples are in sync
48+
run: |
49+
vendor/bin/readme-examples-sync
50+
git diff --exit-code README.md || (echo "README.md is out of sync with example files. Run 'vendor/bin/readme-examples-sync' and commit the changes." && exit 1)
51+
4752
- name: Check dependencies
4853
run: vendor/bin/composer-dependency-analyser
4954

captainhook.json

Lines changed: 0 additions & 41 deletions
This file was deleted.

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@
1717
"php": "^8.4"
1818
},
1919
"require-dev": {
20-
"captainhook/captainhook-phar": "^5.25",
2120
"ergebnis/composer-normalize": "^2.47",
2221
"friendsofphp/php-cs-fixer": "^3.85",
2322
"phpstan/extension-installer": "^1.4",
2423
"phpstan/phpstan": "^2.1",
2524
"phpstan/phpstan-phpunit": "^2.0",
2625
"phpunit/phpunit": "^12.3",
27-
"ruudk/readme-examples-sync-hook": "^1.0",
26+
"ruudk/readme-examples-sync-hook": "^2.0",
2827
"shipmonk/composer-dependency-analyser": "^1.8",
2928
"ticketswap/php-cs-fixer-config": "^1.0",
3029
"ticketswap/phpstan-error-formatter": "^1.1"
@@ -41,9 +40,13 @@
4140
},
4241
"config": {
4342
"allow-plugins": {
44-
"captainhook/captainhook-phar": true,
4543
"ergebnis/composer-normalize": true,
4644
"phpstan/extension-installer": true
4745
}
46+
},
47+
"scripts": {
48+
"post-install-cmd": [
49+
"command -v lefthook >/dev/null 2>&1 && lefthook install || true"
50+
]
4851
}
4952
}

0 commit comments

Comments
 (0)