Code decoupling from Symfony (and others frameworks)
summary
Company refactors a decade-old POS into a framework-agnostic core by isolating entities, repositories, services, implementing repository interfaces with Doctrine only at the edges, and moving business flows into services that use event-driven service communication instead of direct calls. Controllers and views remain thin I/O adapters, tests and newer PHP versions live in the new module, and the old system keeps running. Work spans about two years, follows Law of Demeter and SRP, and warns this decoupling suits large or long-lived projects only.
AI-written summary · about
chapters (8)
- 0:00Start
- 1:26Why?
- 2:25Our approach
- 4:40Benefits of decoupling
- 10:05Entity
- 11:13Repository
- 13:24Service
- 15:10Controller - View
related talks
42mDecoupling Domain Code from Framework and Infrastructure
28mOverly Attached ORM
38mHow to Effectively Isolate Layers?
31mSymfony and Hexagonal Architecture
34mWhy PHP and Symfony are still in the game
55mAvoid Costly Framework Upgrades
34mDon't Let the Framework Stand in Your Way
48mDeveloping Symfony applications in 2023
