Skip to content

Fix attribute driver mapping pass compatibility with ORM 3#2120

Merged
ostrolucky merged 4 commits intodoctrine:2.18.xfrom
bobvandevijver:mapping-pass
Jan 23, 2026
Merged

Fix attribute driver mapping pass compatibility with ORM 3#2120
ostrolucky merged 4 commits intodoctrine:2.18.xfrom
bobvandevijver:mapping-pass

Conversation

@bobvandevijver
Copy link
Contributor

I'm not completely happy with my method of detecting ORM v2 (it uses the presence of a removed method in v3), but it works. Fixes #1844.

@bobvandevijver bobvandevijver force-pushed the mapping-pass branch 2 times, most recently from d42c473 to 82fb7b1 Compare October 24, 2025 06:44
@bobvandevijver bobvandevijver changed the title Fix annotation/attribute driver mapping pass compatibility with ORM 3 Fix attribute driver mapping pass compatibility with ORM 3 Oct 24, 2025
@greg0ire
Copy link
Member

@bobvandevijver do you still plan to work on this?

@bobvandevijver
Copy link
Contributor Author

@greg0ire Thanks for the ping, this completely slipped my mind!

I've added the requested test, I hope it aligns with what you meant!

public function testAttributeDriverIsRegistered(): void
{
$driverNamespace = 'DoctrineBundle\Entity';
$container = $this->createXmlBundleTestContainer(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I re-used this method as the compiler pass requires almost everything to be configured, such as the default entity manager.

@bobvandevijver
Copy link
Contributor Author

@greg0ire Quick ping to get this PR from my todo list 😃

@ostrolucky ostrolucky added the Bug label Jan 23, 2026
@ostrolucky ostrolucky added this to the 2.18.3 milestone Jan 23, 2026
@ostrolucky ostrolucky merged commit 30e0f73 into doctrine:2.18.x Jan 23, 2026
10 of 11 checks passed
@bobvandevijver bobvandevijver deleted the mapping-pass branch January 23, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants