From b3805549d9e8ed7f99fb9bc8f5470789b3fa2a2c Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Thu, 31 Aug 2017 11:38:49 +0300 Subject: [PATCH] Handle all errors in UnitOfWork commit --- composer.json | 2 +- lib/Doctrine/ORM/UnitOfWork.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 1036b4a13..70e54215d 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ], "minimum-stability": "dev", "require": { - "php": ">=5.4", + "php": ">=7.0", "ext-pdo": "*", "doctrine/collections": "~1.2", "doctrine/dbal": ">=2.5-dev,<2.7-dev", diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index fcbd3ab94..3fe6fa08c 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -408,7 +408,7 @@ class UnitOfWork implements PropertyChangedListener } $conn->commit(); - } catch (Exception $e) { + } catch (\Throwable $e) { $this->em->close(); $conn->rollback();