Skip to content

Commit

Permalink
fix: Fix DoctrineDBAL deprecation (#262)
Browse files Browse the repository at this point in the history
Closes #234.
  • Loading branch information
theofidry authored Dec 3, 2023
1 parent 3fde485 commit 34e4751
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
},
"conflict": {
"doctrine/orm": "<2.6.3",
"doctrine/dbal": "<3.0",
"doctrine/persistence": "<2.0",
"illuminate/database": "<8.12",
"ocramius/proxy-manager": "<2.1",
Expand Down
4 changes: 2 additions & 2 deletions src/Bridge/Doctrine/Purger/Purger.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ public function purge(): void
if ($disableFkChecks) {
$connection = $this->purger->getObjectManager()->getConnection();

$connection->exec('SET FOREIGN_KEY_CHECKS = 0;');
$connection->executeStatement('SET FOREIGN_KEY_CHECKS = 0;');
}

$this->purger->purge();

if ($disableFkChecks && isset($connection)) {
$connection->exec('SET FOREIGN_KEY_CHECKS = 1;');
$connection->executeStatement('SET FOREIGN_KEY_CHECKS = 1;');
}
}

Expand Down

0 comments on commit 34e4751

Please sign in to comment.