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

incompatible with doctrine/orm >= 2.12.0 #774

Closed
BigMichi1 opened this issue Apr 20, 2022 · 3 comments
Closed

incompatible with doctrine/orm >= 2.12.0 #774

BigMichi1 opened this issue Apr 20, 2022 · 3 comments
Assignees
Labels
Milestone

Comments

@BigMichi1
Copy link

today we updated all dependencies to the latest versions by running composer update and faced an issue that broke the application.

we could track it down to the doctrine/orm dependency that was upgraded from 2.11.2 to 2.12.0.

the issue here is that in https://github.com/doctrine/DoctrineModule/blame/5.1.x/src/Service/DriverFactory.php#L75-L76 the check uses the "old deprecated" classes which are now abstract. for 2.12.0 AnnotationDriver should be used from Doctrine\ORM\Mapping\Driver instead of Doctrine\Persistence\Mapping\Driver.

currently it does not pass the check and goes to the else and tries in our case to create an instance of Doctrine\Persistence\Mapping\Driver\AnnotationDriver by passing the path as the first param where an instance of a Reader is expected and later fails with

 Specifying the paths to your entities is required when using Doctrine\ORM\Mapping\Driver\AnnotationDriver to retrieve all class names.

when paths are checked

@ppaulis
Copy link

ppaulis commented Apr 20, 2022

I can try to prepare a fix for this. Is it supposed to support both drivers, as long as the deprecated one exists? Or is the new one sufficiant?

ppaulis added a commit to ppaulis/DoctrineModule that referenced this issue Apr 20, 2022
@ppaulis
Copy link

ppaulis commented Apr 20, 2022

The PR makes it compatible to the new version of the AnnotationDriver, but no longer the old one. If compatibility for both is still needed, just let me know :-)

@driehle
Copy link
Member

driehle commented Apr 23, 2022

Fixed with release of ORM 2.12.1, added conflict in #778

@driehle driehle closed this as completed Apr 23, 2022
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 a pull request may close this issue.

3 participants