mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 01:13:14 +02:00
Use ORMInvalidArgumentException::entityNotManaged($entity) in UnitOfWork::computeSingleEntityChangeSet() #5441
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 @Aerendir on GitHub (Mar 2, 2017).
At line 475 is thrown a generic
\InvalidArgumentException().As Doctrine provides a dedicated
ORMInvalidArgumentException::entityNotManaged($entity)is better to use this so the exception can be caught.Currently I need to catch the exception at that line, but only if it comes from Doctrine and I can't as the generic PHP exception is used.
@Ocramius commented on GitHub (Mar 2, 2017):
@Aerendir dye ti BC concerns, it needs to still extend
InvalidArgumentExceptionthough.