Skip to content

Commit 18ec081

Browse files
committed
Replace CaptainHook with Lefthook
1 parent a39caed commit 18ec081

File tree

5 files changed

+80
-331
lines changed

5 files changed

+80
-331
lines changed

.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 & 38 deletions
This file was deleted.

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@
1515
"symfony/dependency-injection": "^7.3"
1616
},
1717
"require-dev": {
18-
"captainhook/captainhook-phar": "^5.25",
1918
"ergebnis/composer-normalize": "^2.47",
2019
"friendsofphp/php-cs-fixer": "^3.86",
2120
"phpstan/extension-installer": "^1.4",
2221
"phpstan/phpstan": "^2.1",
2322
"phpstan/phpstan-phpunit": "^2.0",
2423
"phpunit/phpunit": "^12.3",
25-
"ruudk/readme-examples-sync-hook": "^1.0",
24+
"ruudk/readme-examples-sync-hook": "^2.0",
2625
"shipmonk/composer-dependency-analyser": "^1.8",
2726
"symfony/expression-language": "^7.3",
2827
"ticketswap/php-cs-fixer-config": "^1.1",
@@ -40,9 +39,13 @@
4039
},
4140
"config": {
4241
"allow-plugins": {
43-
"captainhook/captainhook-phar": true,
4442
"ergebnis/composer-normalize": true,
4543
"phpstan/extension-installer": true
4644
}
45+
},
46+
"scripts": {
47+
"post-install-cmd": [
48+
"command -v lefthook >/dev/null 2>&1 && lefthook install || true"
49+
]
4750
}
4851
}

0 commit comments

Comments
 (0)