symfony
Installation
SKILL.md
Symfony Framework Guide
Applies to: Symfony 7+, PHP 8.2+, Doctrine ORM, Twig, Messenger
Core Principles
- Convention Over Configuration: Follow Symfony defaults unless there is a strong reason not to
- Dependency Injection: Constructor injection for all services; avoid service locators
- Thin Controllers: Controllers delegate to services; no business logic in controllers
- DTOs at Boundaries: Never expose Doctrine entities directly to API consumers
- Events for Decoupling: Use EventDispatcher and Messenger for side effects
- Explicit Configuration: Use PHP 8 attributes for routing, ORM mapping, and validation
Guardrails
Version and Dependencies
- Target Symfony 7.x with PHP 8.2+
- Use Composer with
composer.lockcommitted
Related skills