Skip to content

Commit

Permalink
fix: Fix Doctrine DBAL deprecation (#60)
Browse files Browse the repository at this point in the history
Closes #41.
  • Loading branch information
theofidry authored Dec 3, 2023
1 parent 238b857 commit 7b8cf62
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/PhpUnit/RefreshDatabaseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ protected static function bootKernel(array $options = []): KernelInterface
static::$fixtures = FixtureStore::getFixtures();
}

$container = static::$kernel->getContainer();
$container->get('doctrine')->getConnection(FixtureStore::getConnectionName())->beginTransaction();
$connection = static::$kernel
->getContainer()
->get('doctrine')
->getConnection(FixtureStore::getConnectionName());

$connection->setNestTransactionsWithSavepoints(true);
$connection->beginTransaction();

return $kernel;
}
Expand Down

0 comments on commit 7b8cf62

Please sign in to comment.