Skip to content

Commit

Permalink
fix: Fix Doctrine DBAL deprecation
Browse files Browse the repository at this point in the history
Closes #41.
  • Loading branch information
theofidry committed Dec 3, 2023
1 parent 49a449d commit 6767397
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 6767397

Please sign in to comment.