mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Doctrine flush silently stops execution #6739
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jdiazgon55 on GitHub (May 28, 2021).
Hi!
Something pretty weird is happening to
flush()in Symfony 4, php 7.4. When we persist and flush the entity, a new record is correctly added to the database.However, the next line is not being executed. It seems
flush()is breaking the normal code flow. This is what we have:So, if we add an
echobefore and afterflush(), we only see the firstecho. We tried adding atry and catchbut no exception is thrown.If we remove the
flush(), the next lines are executed correctly, so it must be there.Is there any part of
flush()that lacks exception handling?@Fedik commented on GitHub (May 28, 2021):
Did you tried to catch an
ExceptionorThrowable? If an Exception then try Throwable:@beberlei commented on GitHub (May 31, 2021):
"silently stops" would point towards a segfault. Can you check your syslog or webserver error log for process crashes?
Otherwise you need to look at different error logs from your framework or error handlers, that is something you need to figure out as we have no means of helping oyu. Doctrine does not itself prevent exception handling so something must happen.
Maybe run with Xdebug tracing to find out where the code stops.
@beberlei commented on GitHub (Jun 5, 2021):
Closing due to missing feedback