attributes
Installation
SKILL.md
PHP Attributes
When to use
- The user wants to attach structured, machine-readable metadata to a class, method, property, or parameter on PHP 8.0+.
- The user declares framework metadata such as routes, validation constraints, or ORM column mapping directly on the code that owns it.
- The user wants to migrate docblock annotations (Doctrine-style
@Route,@ORM) to native PHP 8 attributes.
When NOT to use
- Do not use attributes when the target runtime is PHP 7.x; keep docblock annotations parsed by a library instead.
- Do not use attributes when the metadata must change at runtime or come from configuration; use a config file or a service instead.