-
-
Notifications
You must be signed in to change notification settings - Fork 478
Fix attribute driver mapping pass compatibility with ORM 3 #2120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.18.x
Are you sure you want to change the base?
Conversation
d42c473 to
82fb7b1
Compare
| $driverArgs[] = $reportFieldsWhereDeclared; | ||
| } | ||
|
|
||
| $driver = new Definition(AttributeDriver::class, $driverArgs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to cover this method with a test that creates a container, adds the compiler pass returned by this method, compiles it and then attempts to retrieve the driver service from it.
|
@bobvandevijver do you still plan to work on this? |
82fb7b1 to
007838c
Compare
007838c to
c60a160
Compare
|
@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( |
There was a problem hiding this comment.
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.
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.