-
-
Notifications
You must be signed in to change notification settings - Fork 454
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 usage of deprecated doctrine/orm StaticPHP driver factory #1755
Fix usage of deprecated doctrine/orm StaticPHP driver factory #1755
Conversation
My only concern here is that this requires doctrine/persistence 3, but this project supports doctrine/persistence ^2.2. I can't see any reason why we cannot bump this requirement, though. Anyone? |
We should detect the existence of the new class in the DoctrineExtension to keep support for both persistence 2.x (by replacing the value of the parameter). This way, we would keep the same range of support. |
But why do we still need persistence 2.x? |
Based on https://packagist.org/packages/doctrine/persistence/stats, doctrine/persistence 2.x still has quite some installs. But maybe we could still drop it. what is sure is that we cannot drop it in 2.11.x. Dropping support for a major version of one of our dependencies should be done in a minor version rather than a patch. |
I also wonder what's even reading these .class parameters. I don't see anything in project referencing them. Perhaps it's some external bundle, or project itself. They shouldn't rely on these .class parameters, they were deprecated long time ago. |
They are used in the base class of the DI extension. |
In that case, fix should be in doctrine-bridge. It shouldn't read these params anymore. https://github.com/doctrine/DoctrineBundle/blob/2.9.x/UPGRADE-2.1.md#upgrade-from-20-to-21 |
closing as explained |
@ostrolucky, apologies for the duplicate post 🙏. |
Search for |
Don’t know if things changed since this PR was opened but it really seems it is DoctrineBundle’s
EDIT: seems like symfony/symfony#33319 got no follow-up 😅 |
The background
I'm using the latest version of this bundle and the
staticphp
driver for entity mapping. I'm trying to upgrade to doctrine/orm:3.0.0 and this version of the ORM removes the deprecatedDoctrine\ORMapping\Driver\StaticPHPDriver
class (replaced byDoctrine\Persistence\Mapping\Driver\StaticPHPDriver
).The problem
In the default DIC settings containing the driver class name
staticphp
still points to the old class that was deleted by doctrine/orm:3.0.0, it crashes completely after migrationThe solution
Stop referring to the old class and switch to the new one.