Skip to content

Commit

Permalink
replace deprecated call with ->fetchAllAssociative()
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaicher committed Nov 1, 2022
1 parent 710c78f commit dcdd388
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Controller/ProfilerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
}

/**
Expand All @@ -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();
}

/**
Expand All @@ -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();
}

/**
Expand All @@ -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();
}
}

0 comments on commit dcdd388

Please sign in to comment.