I hope this question haven't already answered but i don't find it.
I using doctrine2 in my symfony (3.4) project. I use persist and flush so many times into it without any problems throught container, in a little piece of code i have some trouble i can't figure out...
In my controller i have a code like this :
$obj = $this->container->get('some.service')->initiateObj(some_params);
$this->getManager()->persist($obj);
$this->getManager()->flush();
// I can't dump here
My object is set and returned correctly from my first code line. The persist function work perfectly. If i dump my object after persist, doctrine event setting for this object right sets.
After the flush i have an error 500 from my browser (chromium).
I was thinking the problem were in a pre/postFlush event, but when a dump in doctrine EntityManager code, the unitOfWork->commit function work correctly without error and i can dump after it.
But i can't dump in my controller just after flush...
Here the EntityManager from doctrine code :
public function flush($entity = null)
{
$this->errorIfClosed();
$this->unitOfWork->commit($entity);
// I can dump here
}
I haven't any symfony/doctrine log from that, no apache2 log too.
Is anyone have an idea from where an error can throw after the commit function ?
Thank you very much for your help !