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
Doctrine provides method to reset (create new instance of) entity manager. This is useful for example when entity manager has closed after failed transaction. Method is found Doctrine\Common\Persistence\AbstractManagerRegistry::resetManager(). Since doctrine/doctrine-bundle >= 1.6.4, the entity manager service is marked as lazy
But with JMSDiExtraBundle and doctrine_integration enabled, the entity manager is not reset and instead the old closed instance of entity manager is returned.
Downgrading to doctrine-bundle 1.6.3 fixes the issue.
Disabling JMSDiExtraBundle fixes the issue
Setting doctrine_integration: false fixes the issue
Tested using JMSDiExtraBundle 1.8.2, Symfony 3.3.9 and doctrine-bundle 1.6.8
The text was updated successfully, but these errors were encountered:
I've also just spent a while debugging this. Before I thought about disabling the integration, I found that if I set 'doctrine.orm.default_entity_manager.delegate' to null in the container, subsequent calls to doctrine->getManager() return a correctly reset EM within the JMS proxy.
If the delegate were to be reset along with the em, I think this problem would go away. Not sure that's the correct approach however. Symfony\Bridge\Doctrine\ManagerRegistry
If only my googling had found this one 3 hours ago.
Doctrine Bundle: 1.6.4
JMS DI Extra Bundle: 1.8.2
Symfony 2.8.27
Doctrine provides method to reset (create new instance of) entity manager. This is useful for example when entity manager has closed after failed transaction. Method is found
Doctrine\Common\Persistence\AbstractManagerRegistry::resetManager()
. Since doctrine/doctrine-bundle >= 1.6.4, the entity manager service is marked as lazyBut with JMSDiExtraBundle and doctrine_integration enabled, the entity manager is not reset and instead the old closed instance of entity manager is returned.
Downgrading to doctrine-bundle 1.6.3 fixes the issue.
Disabling JMSDiExtraBundle fixes the issue
Setting
doctrine_integration: false
fixes the issueTested using JMSDiExtraBundle 1.8.2, Symfony 3.3.9 and doctrine-bundle 1.6.8
The text was updated successfully, but these errors were encountered: