Skip to content

Use Doctrine ORM 3 in dev dependencies and tests - #1324

Open
radimvaculik wants to merge 2 commits into
masterfrom
doctrine-orm-3-dev
Open

radimvaculik wants to merge 2 commits into
masterfrom
doctrine-orm-3-dev

Conversation

@radimvaculik

@radimvaculik radimvaculik commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #1322. Doctrine ORM 2 is no longer supported. Datagrid itself has no Doctrine requirement and no conflict is added, so ORM 2 may still install for users, but tests now run against ORM 3 only.

Changes

  • require-dev: doctrine/orm: ^3.0 (was ^2.20.2).
  • Removed doctrine/annotations and doctrine/cache (abandoned, annotations conflict with ORM 3's doctrine/lexer ^3).
  • Added symfony/cache (needed by ORMSetup in ORM 3).
  • Added doctrine/collections: ^2.2.0 || >=3.1.1: 3.0.0–3.1.0 break composite expressions on array items (ArrayCollection::matching() throws a TypeError for composite expressions over array elements doctrine/collections#554, fixed by Another methods on Row callbacks #555, not yet released). Dev-only, users are not affected.
  • DoctrineDataSourceTest: attribute mapping instead of annotations, ORMSetup::createAttributeMetadataConfiguration() + new EntityManager(), SQLite connection without url (removed in DBAL 4), native lazy objects on PHP 8.4+ (ORM 3 with symfony/var-exporter 8 has no LazyGhost), typed walkOrderByItem(OrderByItem): string.
  • phpstan.neon: ignore deprecation of Doctrine\ORM\Tools\Pagination\Paginator (deprecated in ORM 3.7, its replacement OffsetPaginator does not exist in older ORM 3.x).

No changes in src/.

Tested locally (PHP 8.5): ORM 3.7.5 + DBAL 4.5 + collections 2.6 – tests, phpstan, cs pass.

require-dev povoluje doctrine/orm ^2.20.2 || ^3.0 a DoctrineDataSourceTest místo anotací používá atributy, takže běží na obou verzích.
@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.75%. Comparing base (b268295) to head (010a1e3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1324   +/-   ##
=======================================
  Coverage   55.75%   55.75%           
=======================================
  Files          65       65           
  Lines        3024     3024           
=======================================
  Hits         1686     1686           
  Misses       1338     1338           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@f3l1x

f3l1x commented Oct 19, 2026

Copy link
Copy Markdown
Member

Maybe we can drop old Doctrine :-)

@radimvaculik

Copy link
Copy Markdown
Member Author

OK 🫡

Doctrine ORM 2 už není podporovaná, require-dev proto obsahuje jen doctrine/orm ^3.0.
@radimvaculik radimvaculik changed the title Support Doctrine ORM 2 and 3 in dev dependencies and tests Use Doctrine ORM 3 in dev dependencies and tests Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants