symfony-components
Installation
SKILL.md
Symfony components
Symfony ships a new minor release twice a year and its APIs move. This skill does not restate the API. It tells you which version you are on, where to fetch the exact API for that version, which defaults to prefer when the docs offer several options, and which mistakes recur in real projects.
Core principles
| Principle | Meaning |
|---|---|
| Version first | Read the installed version before suggesting any API. Memory of "Symfony 7" is often stale. |
| Docs over memory | Fetch the page for the component and version you need. Do not paste API from recall. |
| Attributes and autowiring | Prefer PHP attributes and autowiring. Use YAML or XML only for what attributes cannot express. |
| Fail loudly, run long | Code must survive long-running workers: no leaked state, idempotent handlers. |
| Zero deprecations | Treat deprecation notices as a ratchet. They are the upgrade path to the next major. |
Step 1: find the installed version
Read it from composer.lock, not from composer.json constraints (^7.2 says little).