4. Symfony Worst Practices
Fat Stupid Ugly Controllers
■ Use single responsibility principle also for controller actions
■ Do not start coding in controllers
■ Do not create forms in controllers
■ Extract your shared methods or avoid them at all
■ Go the test driven way
6. Symfony Worst Practices
Doctrine likes memory
■ Avoid Object Hydration when handling many entities
■ Don’t load the whole entity if you only need reference to it
■ Do not flush inside cycles
7. Symfony Worst Practices
Fat DI Container
■ Controllers as services
■ Single use forms
■ Do not create parameter if you will never needed to change that value