← ClaudeAtlas

phplisted

PHP language conventions, modern idioms, and type system. Invoke whenever task involves any interaction with PHP code — writing, reviewing, refactoring, debugging, or understanding PHP projects.
xobotyi/cc-foundry · ★ 23 · Code & Development · score 81
Install: claude install-skill xobotyi/cc-foundry
# PHP **Strict types, explicit contracts, no magic. If a class needs a docblock to explain what its properties do, the properties are named wrong.** PHP 8.5+ is the baseline. Use modern syntax unconditionally — union types, enums, readonly classes, property hooks, named arguments, `match`, pipe operator. No backward compatibility with older PHP versions unless the project explicitly requires it. Every PHP file starts with `declare(strict_types=1)`. ## References - **Type system** → `${CLAUDE_SKILL_DIR}/references/typing.md` — Union/intersection/DNF types, nullable patterns, typed properties and constants, coercion rules, variance - **OOP patterns** → `${CLAUDE_SKILL_DIR}/references/oop.md` — Interfaces, traits, readonly, property hooks, enums, constructor promotion, lazy objects, magic methods - **Concurrency** → `${CLAUDE_SKILL_DIR}/references/concurrency.md` — Fiber API, generator coroutines, comparison table, async library guidance - **Packaging** → `${CLAUDE_SKILL_DIR}/references/packaging.md` — composer.json templates, version constraints, project layouts, namespace conventions ## Naming - **Classes, interfaces, traits, enums** — PascalCase: `UserService`, `Renderable`, `Status` - **Methods, functions** — camelCase: `findById`, `getFullName` - **Properties, variables** — camelCase: `$userName`, `$isActive` - **Constants (class and global)** — UPPER_SNAKE_CASE: `MAX_RETRIES`, `DEFAULT_LOCALE` - **Namespaces** — PascalCase segments: `App\Http\Controller` - *