-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Fix wiring of PHP metadata drivers on doctrine/orm 3.x #1832
Conversation
Looks like tests will need fixing. And for SA issues you can suppress them. |
Hm should I split tests into |
My preference would be to upgrade current tests to use attribute instead of annotation and skip them for orm < 3.x |
We don't need to skip them for ORM 2.x AFAIK. Attributes are supported there as well (on PHP 8+) |
Do I keep the |
you can remove it |
b814469
to
8040928
Compare
Okay, done. Not sure why some tests are still failing though 🤔 |
I think those test failures are a symptom of this branch not being triggered now :( https://github.com/symfony/symfony/blob/c905bb4db3eec98e156199341891f62247f83fb6/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php#L224 |
Waat so the Doctrine Bridge does need to be updated 😅 |
I don't know, just saying that's the cause why tests fail. Proper course of action would be to find out why was that code branch added and find if same reasoning still applies nowadays. Then we know if we need to preserve the behavior somehow, or adjust tests |
See symfony/symfony#53681; seems that we cannot be compatible with Symfony < 6.4 by returning XML and YAML drivers’ class name instead of the parameter. |
Maybe this PR should focus to simply returning the correct PHP driver’s class name? That would fix symfony/symfony#58738, hopefully without any side effect. |
I believe we just need to backport symfony/symfony#53681 to 5.4 branch. It's either that, or we cut off symfony/doctrine-bridge 5.4.x support here |
Okay opened symfony/symfony#58772 |
Woops this got closed with symfony/symfony#58772 and I cannot reopen it 😓 Can someone do it for me or should I open another PR? EDIT: thanks @nicolas-grekas 🙏 |
Last thing needed here I think is to adjust symfony/doctrine-bridge requirement to ensure we don't install < 5.4.46 version |
Shouldn’t the |
indeed |
CI is green 🎉 |
Follows symfony/symfony#33319, takes over #1755 and fixes symfony/symfony#58738.
Some metadata drivers were removed in doctrine/orm 3 and must then be used from doctrine/persistence.
Since the parameters used to infer their class name are deprecated, this PR rewrites
getMetadataDriverClass
so that it selects the right one.Note that some class parameters are still used in the
DoctrineExtension
but I considered them out of this PR’s scope.