Comments (6)
We cannot just remove those class imports from codebase to preserve compatibility with older Symfony versions. However, there is a compatibility layer which switches between new and old classes. So what particular issue are you running into?
from doctrinebundle.
Our project is using symfony/doctrine-bridge
v7.0.0 and doctrine/doctrine-bundle
2.11.1.
Adding calls to ResolveTargetEntityListener::addResolveTargetEntity
using a CompilerPass
doesn’t work anymore: no error, it’s just never called.
$resolveTargetEntityListener = $container->findDefinition('doctrine.orm.listeners.resolve_target_entity');
$interface = 'App\My\EntityInterface';
$entity = 'App\My\Entity';
$resolveTargetEntityListener->addMethodCall('addResolveTargetEntity', [$interface, $entity, []]);
Switching back to symfony/doctrine-bridge
v6.3.2 and doctrine/doctrine-bundle
2.10.2: all is working as expected.
What’s the compatibility layer you refer to?
from doctrinebundle.
To be clear: I’m not suggesting to remove any class, I’m suggesting to correct declaration of the three services in order to use the Listerner
and not the Subscriber
(which doesn’t exists anymore in symfony/doctrine-bridge
7.0) 😄
from doctrinebundle.
We are using listener instead of subscriber in case subscribers are not available, BC layer for that can be seen eg. at
DoctrineBundle/DependencyInjection/DoctrineExtension.php
Lines 457 to 460 in 846b923
Not sure why it doesn't work in your case. If you can dig deeper into it, that would be appreciated.
from doctrinebundle.
Yes, I’m on it! I’ve seen the Extension after posting my message.
Will get back soon I hope. :)
from doctrinebundle.
So... It was a missing tag on our side on the doctrine.orm.listeners.resolve_target_entity
.
Sorry for the noise, I’m closing this non-issue!
from doctrinebundle.
Related Issues (20)
- Feature request: Add support for TypeFieldMapper HOT 6
- Allow configuring `rejectIdCollisionInIdentityMap`
- setting doctrine.dbal.connections.default.url to null does not make it use explicit config HOT 4
- Default transaction isolation level configuration HOT 6
- No automatic rollback when migration fails HOT 3
- Passing the request object to the EntityValueResolver's expression finding HOT 1
- Missing explanation of 'dbname_suffix' config value meaning in documentation HOT 1
- MessengerTransportDoctrineSchemaListener is being be registered if symfony/doctrine-messenger is not installed. HOT 5
- Support Symfony 7 HOT 1
- Missing default schemes HOT 1
- Incompatibility with symfony/var-exporter v7.0 HOT 4
- Added readonly while the Repository isn't PHP >= 8.1 HOT 5
- Unable to setup custom id generator - MappingDriver seems like bugged HOT 1
- PostrgreSQL 15 with Symfony 6.4 ID generation deprecation - SEQUENCE for Doctrine\DBAL\Platforms\PostgreSqlPlatform HOT 4
- Subscribing to onSchemaCreateTable events is deprecated HOT 3
- Unsetting "dbname" param leads to incorrectly casting deprecation HOT 2
- Add support to the new id entity generation preferences in Doctrine ORM 3.0 HOT 1
- Missing `doctrine/common` in composer.json
- Missing SimplifiedYamlDriver but it is still required in code. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctrinebundle.