We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca818a8 commit 71061f5Copy full SHA for 71061f5
tests/Traits/LiipAcmeFixturesTrait.php
@@ -13,6 +13,7 @@
13
14
namespace Liip\Acme\Tests\Traits;
15
16
+use Doctrine\DBAL\Connection;
17
use Liip\Acme\Tests\App\Entity\User;
18
use Symfony\Bundle\FrameworkBundle\Console\Application;
19
use Symfony\Component\Console\Tester\CommandTester;
@@ -62,7 +63,15 @@ private function resetSchema(): void
62
63
64
$manager = $this->getContainer()->get('doctrine')->getManager();
65
66
+ /** @var Connection $connection */
67
$connection = $manager->getConnection();
68
+
69
+ // Doctrine DBAL 3.x deprecated query() in favor of executeQuery()
70
+ if (method_exists($connection, 'executeQuery')) {
71
+ $connection->executeQuery('DELETE FROM liip_user');
72
73
+ return;
74
+ }
75
$connection->query('DELETE FROM liip_user');
76
}
77
0 commit comments