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
When I instantiate the entityManager I get the following error: (For information it worked correctly with Dasprid services) The class 'Domain\Account\Entity\User' was not found in the chain configured namespaces.
If I understand correctly, the problem comes from the Factory DriverFactory
which tests if the driver and type is an instanceDoctrine\Persistence\Mapping\Driver\MappingDriverChain and not an instance of Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain as described in the example of minimal configuration
Except I do not use the Doctrine\Persistence library, it is also not required in the composer.
So, what should I do ? Install 'Doctrine\Persistence' and use it in my configuration ?
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered:
MuntzMathias
changed the title
Driver Factory doesn't work with Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain
DriverFactory doesn't work with Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain
Jul 14, 2020
IIRC, this changed because MappingDriverChain changed namespace; I think the solution is indeed to add doctrine/persistence, but without investigating further I don't know why it wouldn't already be required (maybe do a composer update --with(-all)-dependencies to pick it up?).
The example definitely needs updating though, so that needs updating.
Thank you for the answer. Indeed, I cleaned up my composer.json, it contained a dependency on doctrine/orm:^2.7.
I deleted it and completely recreated the vendor, it installed the doctrine/persistence package.
I use it now in my configuration file and it works.
Hello
I'm switching between the repository of Dasprid and that of Roave.
I have the following configuration for the configuration of my entityManager.
When I instantiate the entityManager I get the following error: (For information it worked correctly with Dasprid services)
The class 'Domain\Account\Entity\User' was not found in the chain configured namespaces
.If I understand correctly, the problem comes from the Factory
DriverFactory
which tests if the driver and type is an instance
Doctrine\Persistence\Mapping\Driver\MappingDriverChain
and not an instance ofDoctrine\Common\Persistence\Mapping\Driver\MappingDriverChain
as described in the example of minimal configurationExcept I do not use the
Doctrine\Persistence
library, it is also not required in the composer.So, what should I do ? Install 'Doctrine\Persistence' and use it in my configuration ?
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: