You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since version 2.5.0, the class metadata factory cannot be overridden.
Previous behavior
The document manager has been instantiated taking the class name from the configuration on document manager construction
Current behavior
Since 5987555 the override is broken as the document manager is wired to the final class Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory.
To allow overriding via configuration, it should be wired against Doctrine\Persistence\Mapping\ClassMetadataFactory interface.
Most probably we should introduce our own interface.
Agree
Offhand, what's your use case for custom metadata factory?
It is mostly used for testing actually: I'm using a DocumentManager with a mocked connection and a custom metadata factory in order to precisely control what is returned from the factory itself
BC Break Report
Summary
Since version 2.5.0, the class metadata factory cannot be overridden.
Previous behavior
The document manager has been instantiated taking the class name from the configuration on document manager construction
Current behavior
Since 5987555 the override is broken as the document manager is wired to the final class
Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory
.To allow overriding via configuration, it should be wired against
Doctrine\Persistence\Mapping\ClassMetadataFactory
interface.How to reproduce
The text was updated successfully, but these errors were encountered: