Symfony 4 best practices (Part 1)
summary
Practical Symfony 4 setup: use composer create-project symfony/skeleton, rely on Symfony Flex (install globally) to apply community and official recipes and to enable parallel ZIP downloads (Composer 1.7 + cURL). Manage config with .env and YAML, use the default app namespace, and lock Symfony component versions via extra.symfony.require in composer.json. Prefer annotations for routes, use MakerBundle to generate controllers, prefer AbstractController/getSubscribedServices and autowiring for explicit dependencies, and cache slow results with PSR‑6/PSR‑16 pools (filesystem or Redis).
AI-written summary · about
chapters (11)
- 0:00Introduction and setup
- 4:47Project initialization
- 14:45Understanding Symfony Flex
- 23:33Recipes and configuration
- 34:07Managing environment variables
- 46:56Dependency management
- 1:02:14Web server bundle usage
- 1:13:58Controller development
- 1:25:47Dependency injection best practices
- 1:33:56Maker bundle and services
- 1:59:24Routing and caching








