Skip to content

Upgrade to ORM 3 and DBAL 4 #452

@tuj

Description

@tuj

Upgrade to ORM 3 and DBAL 4

After the Symfony 7.4 upgrade lands, the project will still be on:

  • doctrine/orm 2.20.10 (require ^2.9)
  • doctrine/dbal 3.10.5
  • doctrine/persistence 3.4.4
  • doctrine/collections 2.6.0
  • doctrine/doctrine-bundle (uses 2.x; needs 3.x for ORM 3 / DBAL 4)

ORM 2 enters security-only support and ORM 3 / DBAL 4 are the going-forward line — they remove a long list of deprecations, make EntityRepository generic (better static analysis), drop the
legacy enableLazyGhostObjects switch (lazy ghosts are mandatory), and clean up DBAL's Type API. Doing both together avoids two schema-diff windows.

The codebase is mostly clean for ORM 3: entities use PHP 8 attributes, IDs are ULIDs via symfony/uid (#[ORM\Column(type: 'ulid')] on AbstractBaseEntity), enums use native enumType:, and 24
repository classes extend ServiceEntityRepository. The notable wrinkle is one custom DBAL type — App\DBAL\RRuleType in src/DBAL/RRuleType.php — which uses getName() and
requiresSQLCommentHint(), both removed in DBAL 4. That file needs a rewrite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceRegarding issues that should be handled to keep the codebase up to date.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions