Skip to content
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

Conditionally extend the old AnnotationDriver class #9671

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Apr 22, 2022

Fixes #9668.
Replaces #9670.

This PR restores the old inheritance chain of AnnotationDriver and AttributeDriver if Persistence 2 is installed. Unfortunately, DoctrineModule uses a flawed logic to determine the constructor arguments of a mapping driver class, see doctrine/DoctrineModule#774. With this change, that logic should work again.

When merging this PR up to 3.0.x, I would simply revert it.

Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

Approach LGTM 👍

Copy link
Member

@greg0ire greg0ire left a comment

Choose a reason for hiding this comment

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

Awesome! Because of my lack of experience with traits, I didn't expect the trait not to cause any issue since it redefines the same methods as the parent, but this looks really good 👍

@derrabus derrabus merged commit 2e4a872 into doctrine:2.12.x Apr 22, 2022
@derrabus derrabus deleted the bugfix/conditionally-extend-annotation-driver branch April 22, 2022 17:46
derrabus added a commit to derrabus/orm that referenced this pull request Apr 22, 2022
* 2.13.x:
  Conditionally extend the old AnnotationDriver class (doctrine#9671)
derrabus added a commit to derrabus/orm that referenced this pull request Apr 22, 2022
* 2.13.x:
  Conditionally extend the old AnnotationDriver class (doctrine#9671)
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.

Annotation receives array of paths instead of reader
4 participants