mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-31 22:23:27 +08:00
feat: add php rule pack
This commit is contained in:
24
rules/php/hooks.md
Normal file
24
rules/php/hooks.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
paths:
|
||||
- "**/*.php"
|
||||
- "**/composer.json"
|
||||
- "**/phpstan.neon"
|
||||
- "**/phpstan.neon.dist"
|
||||
- "**/psalm.xml"
|
||||
---
|
||||
# PHP Hooks
|
||||
|
||||
> This file extends [common/hooks.md](../common/hooks.md) with PHP specific content.
|
||||
|
||||
## PostToolUse Hooks
|
||||
|
||||
Configure in `~/.claude/settings.json`:
|
||||
|
||||
- **Pint / PHP-CS-Fixer**: Auto-format edited `.php` files.
|
||||
- **PHPStan / Psalm**: Run static analysis after PHP edits in typed codebases.
|
||||
- **PHPUnit / Pest**: Run targeted tests for touched files or modules when edits affect behavior.
|
||||
|
||||
## Warnings
|
||||
|
||||
- Warn on `var_dump`, `dd`, `dump`, or `die()` left in edited files.
|
||||
- Warn when edited PHP files add raw SQL or disable CSRF/session protections.
|
||||
Reference in New Issue
Block a user