From f343bc4a410cea9bf3eba8cf43597b253158de15 Mon Sep 17 00:00:00 2001 From: Stefan Wessel Date: Fri, 18 Feb 2022 15:40:46 +0100 Subject: [PATCH 1/3] Update ExecuteService.php --- src/Services/Sql/ExecuteService.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Services/Sql/ExecuteService.php b/src/Services/Sql/ExecuteService.php index 7c4f843..7d7b095 100644 --- a/src/Services/Sql/ExecuteService.php +++ b/src/Services/Sql/ExecuteService.php @@ -57,17 +57,13 @@ public function execute(array $sql = []): bool throw new \Exception(__CLASS__ . ': only sql-statements packed in array can be executed.'); } if (0 < count($sql)) { - $this->connection->beginTransaction(); try { foreach ($sql as $query) { if (true !== $this->_execute($query)) { return false; } } - $this->connection->commit(); } catch (\Exception $e) { - $this->connection->rollBack(); - $this->connection->setAutoCommit(true); throw new \Exception("Cannot commit", 500, $e); } } @@ -86,8 +82,6 @@ private function _execute(string $query): bool $result = $statement->executeQuery(); return true; } catch ( DriverException $e) { - $this->connection->rollBack(); - $this->connection->setAutoCommit(true); $this->errMsg = "Cannot execute SQL: $query"; return false; } From 641944d23b1c89cdda0db3edda7b9929c9e7fe36 Mon Sep 17 00:00:00 2001 From: Stefan Wessel Date: Fri, 18 Feb 2022 15:41:52 +0100 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42df08b..46ed5db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog for NetBrothers Versions =================================== +Version 0.0.4 - 18.02.2022 +---------------------------------- +- Fixing Bug "There is no active transaction". +- Upgrading Version-Number + Version 0.0.3 - 03.02.2022 ---------------------------------- - Adding "?ExtensionInterface" as a native return type declaration in class `NetBrothers\VersionBundle\NetBrothersVersionBundle`. From d0d78f99a55fbd4d920f6101c4b061e95da1c28e Mon Sep 17 00:00:00 2001 From: Stefan Wessel Date: Fri, 18 Feb 2022 15:42:15 +0100 Subject: [PATCH 3/3] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fd28ff2..c84b3ba 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "netbrothers-gmbh/version-bundle", "description": "SymfonyBundle for handling versions based on triggers in mysql with doctrine", - "version": "0.0.3", + "version": "0.0.4", "keywords": ["symfony","bundle","versioning","doctrine","mysql"], "type": "symfony-bundle", "require": {