Skip to content

Commit

Permalink
TASK: Test possible fix for PDOException with PHP8
Browse files Browse the repository at this point in the history
  • Loading branch information
albe committed Feb 25, 2021
1 parent ff7f8a8 commit f68dea2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Tests/Behat/FlowContextTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ public function resetTestFixtures($event): void
$doctrineService = $this->objectManager->get(Service::class);
$doctrineService->executeMigrations();
$needsTruncate = false;
} catch (\PDOException $exception) {
if ($exception->getMessage() !== 'There is no active transaction') {
throw $exception;
}
$needsTruncate = true;
}

$schema = $entityManager->getConnection()->getSchemaManager()->createSchema();
Expand Down

0 comments on commit f68dea2

Please sign in to comment.