Skip to content

Commit 4b1612b

Browse files
[DoctrineBridge] fix DBAL v3 compat
1 parent a432444 commit 4b1612b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
namespace Symfony\Bridge\Doctrine\Security\RememberMe;
1313

1414
use Doctrine\DBAL\Connection;
15-
use Doctrine\DBAL\Driver\Result;
15+
use Doctrine\DBAL\Driver\Result as DriverResult;
16+
use Doctrine\DBAL\Result;
1617
use Doctrine\DBAL\Types\Type;
1718
use Doctrine\DBAL\Types\Types;
1819
use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken;
@@ -64,7 +65,7 @@ public function loadTokenBySeries($series)
6465
$paramValues = ['series' => $series];
6566
$paramTypes = ['series' => \PDO::PARAM_STR];
6667
$stmt = $this->conn->executeQuery($sql, $paramValues, $paramTypes);
67-
$row = $stmt instanceof Result ? $stmt->fetchAssociative() : $stmt->fetch(\PDO::FETCH_ASSOC);
68+
$row = $stmt instanceof Result || $stmt instanceof DriverResult ? $stmt->fetchAssociative() : $stmt->fetch(\PDO::FETCH_ASSOC);
6869

6970
if ($row) {
7071
return new PersistentToken($row['class'], $row['username'], $series, $row['value'], new \DateTime($row['last_used']));

0 commit comments

Comments
 (0)