diff --git a/composer.lock b/composer.lock index a846c3f..5a6b8c9 100644 --- a/composer.lock +++ b/composer.lock @@ -2619,12 +2619,12 @@ "source": { "type": "git", "url": "https://github.com/rich-id/web-test-bundle.git", - "reference": "c6fea31d1312cafb81e70730c4d0b361d5e7aa35" + "reference": "6c95e0dccf9a7a1f4294455e5be575a428cb2087" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rich-id/web-test-bundle/zipball/c6fea31d1312cafb81e70730c4d0b361d5e7aa35", - "reference": "c6fea31d1312cafb81e70730c4d0b361d5e7aa35", + "url": "https://api.github.com/repos/rich-id/web-test-bundle/zipball/6c95e0dccf9a7a1f4294455e5be575a428cb2087", + "reference": "6c95e0dccf9a7a1f4294455e5be575a428cb2087", "shasum": "" }, "require": { @@ -2669,7 +2669,7 @@ "issues": "https://github.com/richcongress/web-test-bundle/issues", "source": "https://github.com/richcongress/web-test-bundle" }, - "time": "2024-03-11T13:42:42+00:00" + "time": "2024-05-16T15:00:43+00:00" }, { "name": "sebastian/cli-parser", diff --git a/src/Doctrine/Middleware/SqliteRegexMiddleware.php b/src/Doctrine/Middleware/SqliteRegexMiddleware.php index effd651..be30831 100644 --- a/src/Doctrine/Middleware/SqliteRegexMiddleware.php +++ b/src/Doctrine/Middleware/SqliteRegexMiddleware.php @@ -4,11 +4,14 @@ use Doctrine\DBAL\Driver\Middleware; use Doctrine\DBAL\Driver; +use Doctrine\DBAL\Platforms\SqlitePlatform; class SqliteRegexMiddleware implements Middleware { public function wrap(Driver $driver): Driver { - return new SqliteRegexDriver($driver); + return $driver->getDatabasePlatform() instanceof SqlitePlatform + ? new SqliteRegexDriver($driver) + : $driver; } } \ No newline at end of file diff --git a/src/Manager/FixtureManager.php b/src/Manager/FixtureManager.php index 356a863..4618b62 100644 --- a/src/Manager/FixtureManager.php +++ b/src/Manager/FixtureManager.php @@ -55,10 +55,7 @@ protected function initReferenceRepository(ReferenceRepository $referenceReposit $this->entityManager->flush(); - if (StaticDriver::isInTransaction()) { - StaticDriver::commit(); - StaticDriver::beginTransaction(); - } + StaticDriver::forceCommit(); } public function getReference(string $class, string $reference)