Doctrine ORM 2 end of life
Doctrine ORM 2.x reaches end of life in February 2027. ORM 3 has been the maintained major since early 2024 and is what current DoctrineBundle, API Platform 4 and Symfony 7.4 projects expect.
What ORM 3 removes
- Annotation mapping.
@ORM\Entityand friends are gone; mapping is attributes, XML or PHP. doctrine/annotations itself is abandoned. This is the bulk of the work and it is what Rector's Doctrine set automates. - DBAL 2 and most DBAL 3 legacy APIs. Custom DBAL types need the new signatures,
Statement::execute()result handling changed, platform classes were renamed. flush($entity),EntityManager::create(),Setup::createAnnotationMetadataConfiguration(), the old proxy generation and a set of lifecycle event signatures.- Lazy ghost objects replace the old proxies (Symfony's VarExporter). Code that relied on proxy class names or
__load()needs attention.
Why it comes with the Symfony upgrade
ORM 3 does not require Symfony 7. It runs fine on Symfony 6.4 with DoctrineBundle 2.11 or newer. But the annotation-to-attribute move is the same one Symfony 7 routing, API Platform 3 and PHPUnit 12 require, so doing it once for all four is the efficient order. Most 5.4 and 6.4 codebases do it as the second PR of their upgrade, right after deprecations.
Sequence
- Annotations → attributes with Rector, on the current ORM version. Deployable on its own.
- DBAL 3 → 4: fix custom types and raw SQL result handling.
- ORM 2.19 → 3.x: deprecations first (2.19 logs them), then the major.
- Regenerate migrations diff to confirm the schema did not change.
As a fixed-price add-on the ORM upgrade is €1,500 to €3,500 depending on the number of entities, custom types and raw DBAL usage. See services and prices.
Where does your application stand?
Upload your composer.lock and get your upgrade path, the packages that block it, and a readiness score in seconds. Free, no account, no source code.
Dates verified 2026-09-09 against the official release pages. Other deadlines: API Platform 3 end of life · Symfony 6.4 end of life · Symfony 5.4 end of life · all end-of-life dates. Also available in Deutsch Nederlands