-
Notifications
You must be signed in to change notification settings - Fork 34
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
Call to a member function getClassAnnotations() on array with doctrine/orm:^2.12 #70
Comments
Seems like an upstream BC break: doctrine/orm#9668 /cc @greg0ire I think a revert in upstream is kinda needed here. |
@Ocramius @eichie FYI, We are discussing potential solutions for the same problem in the Laminas Module: |
@ppaulis I think this needs a full revert in upstream. |
😟 @Ocramius do you foresee more breakage in other packages or do you think none of the solutions above are acceptable? Regardless of whether this gets revert, should the code in doctrine module be reworked? It seems wrong to assume every child class of AnnotationDriver will have a constructor with the same signature. |
It is what it is, @greg0ire: involuntary BC breaks are bugs, and the source/root cause here is Remember that you are only observing the BC breaks on these packages, not what users are doing in closed source software. |
As for assumptions: absolutely - these modules are janky integration code, and rework may be needed overall, but that comes by including better static analysis, which would have caught this too. These packages are old and stable though, so any change introduces risk, rather than value. |
Ok, l should be able to work on this soon. I'll revert then work on trying to find a better upgrade path. |
@derrabus kindly fixed my sh*t in the latest release, which he is going to tag as 2.12.1 very soon; this can be closed :) |
@eichie Can you please check if ORM 2.12.1 fixes your issue? |
Moin,
the use of
Doctrine\ORM\Mapping\Driver\AnnotationDriver
does not work sincedoctrine/orm:^2.12
.Here in the https://github.com/doctrine/orm/blob/2.12.x/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php the parent class was changed to
MappingDriver
.In https://github.com/Roave/psr-container-doctrine/blob/3.6.x/src/DriverFactory.php#L52 it is checked whether this is a subclass of
Doctrine\Persistence\Mapping\Driver\AnnotationDriver
. However, this class is deprecated and as far as I can see, no more subclasses are provided.This then leads to the following error:
Call to a member function getClassAnnotations() on array in vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php:82
The text was updated successfully, but these errors were encountered: