Open reypm opened 3 years ago
Here's a related issue: https://github.com/Codeception/Codeception/issues/5439
And I just suggested to deprecate grabEntityFromRepository()
altogether, and just inject Doctrine's Repository instead: https://github.com/Codeception/module-doctrine2/issues/22
Because of this flush()
problem, I added a recommendation for Symfony users to use the "built-in" repository, instead of this module's grab...()
methods: https://codeception.com/docs/modules/Doctrine2#Grabbing-Entities-with-Symfony
This is at least a step forward for most users...
So I think this issue can be closed.
I have configured
Doctrine2
andSymfony
modules as follow:and I have created a helper to be used as part of my Functional tests as follow (snippet with relevant parts only):
from my test the code above is being called as:
But I end up with the following error:
from the error above lines 193 is:
I am not sure if the
flush
insidegrabEntitiesFromRepository
method is what is causing this or what could be the reason of it, true story is that I have been trying to debug this for hours without success so any help is more than welcome. What I am a missing here?