---
title: "PHP Hooks"
description: "> This file extends [common/hooks.md](../common/hooks.md) with PHP specific content."
type: skill
canonical_url: https://claudary.paisolsolutions.com/skills/hooks-29
source: "Claudary"
difficulty: intermediate
author: "Claude Code Knowledge Pack"
date: 2026-07-10T11:25:13.385Z
license: CC-BY-4.0
attribution: "PHP Hooks — Claudary (https://claudary.paisolsolutions.com/skills/hooks-29)"
---

# PHP Hooks
> This file extends [common/hooks.md](../common/hooks.md) with PHP specific content.

## Overview

---
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.

---

Source: [Claudary](https://claudary.paisolsolutions.com/skills/hooks-29) · https://claudary.paisolsolutions.com
