diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index 66aace05d2d..c3535148714 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -926,7 +926,7 @@ private function checkLockRequirements(int $lockMode, ClassMetadata $class): voi if (!$class->isVersioned) { throw OptimisticLockException::notVersioned($class->name); } - // Intentional fallthrough + break; case LockMode::PESSIMISTIC_READ: case LockMode::PESSIMISTIC_WRITE: if (!$this->getConnection()->isTransactionActive()) {