diff --git a/Controller/ProfilerController.php b/Controller/ProfilerController.php index fc3246834..ef3db2a32 100644 --- a/Controller/ProfilerController.php +++ b/Controller/ProfilerController.php @@ -7,14 +7,12 @@ use Doctrine\DBAL\Platforms\OraclePlatform; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Platforms\SQLServerPlatform; -use PDO; use Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Profiler\Profiler; use Symfony\Component\VarDumper\Cloner\Data; use Throwable; use Twig\Environment; - use function assert; use function stripos; @@ -101,7 +99,7 @@ private function explainSQLitePlatform(Connection $connection, array $query): ar } return $connection->executeQuery('EXPLAIN QUERY PLAN ' . $query['sql'], $params, $query['types']) - ->fetchAll(PDO::FETCH_ASSOC); + ->fetchAllAssociative(); } /** @@ -125,7 +123,7 @@ private function explainSQLServerPlatform(Connection $connection, array $query): $stmt = $connection->executeQuery($sql, $params, $query['types']); - return $stmt->fetchAll(PDO::FETCH_ASSOC); + return $stmt->fetchAllAssociative(); } /** @@ -142,7 +140,7 @@ private function explainOtherPlatform(Connection $connection, array $query): arr } return $connection->executeQuery('EXPLAIN ' . $query['sql'], $params, $query['types']) - ->fetchAll(PDO::FETCH_ASSOC); + ->fetchAllAssociative(); } /** @@ -155,6 +153,6 @@ private function explainOraclePlatform(Connection $connection, array $query): ar $connection->executeQuery('EXPLAIN PLAN FOR ' . $query['sql']); return $connection->executeQuery('SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY())') - ->fetchAll(PDO::FETCH_ASSOC); + ->fetchAllAssociative(); } }