Skip to content

Commit

Permalink
Merge pull request #405 from nextcloud/bugfix/noid/prepare-doctrine-d…
Browse files Browse the repository at this point in the history
…bal-update

fix: Improve compatibility with upcoming doctrine/dbal 4.0
  • Loading branch information
nickvergessen authored Jul 15, 2024
2 parents 1ea8cb3 + 4dcd4aa commit cee75ce
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/Controller/DatabaseProfilerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

namespace OCA\Profiler\Controller;

use Doctrine\DBAL\Platforms\OraclePlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Exception;
use OC\DB\DbDataCollector;
use OCP\AppFramework\Controller;
Expand Down Expand Up @@ -48,10 +46,9 @@ public function explain(string $token, int $query): Response {
}

try {
$platform = $this->connection->getDatabasePlatform();
if ($platform instanceof SqlitePlatform) {
if ($this->connection->getDatabaseProvider() === IDBConnection::PLATFORM_SQLITE) {
$results = $this->explainSQLitePlatform($query);
} elseif ($platform instanceof OraclePlatform) {
} elseif ($this->connection->getDatabaseProvider() === IDBConnection::PLATFORM_ORACLE) {
$results = $this->explainOraclePlatform($query);
} else {
$results = $this->explainOtherPlatform($query);
Expand Down

0 comments on commit cee75ce

Please sign in to comment.