[DoctrineBridge] fix DBAL v3 compat
This commit is contained in:
parent
a4324447f1
commit
4b1612b8dd
@ -12,7 +12,8 @@
|
|||||||
namespace Symfony\Bridge\Doctrine\Security\RememberMe;
|
namespace Symfony\Bridge\Doctrine\Security\RememberMe;
|
||||||
|
|
||||||
use Doctrine\DBAL\Connection;
|
use Doctrine\DBAL\Connection;
|
||||||
use Doctrine\DBAL\Driver\Result;
|
use Doctrine\DBAL\Driver\Result as DriverResult;
|
||||||
|
use Doctrine\DBAL\Result;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Type;
|
||||||
use Doctrine\DBAL\Types\Types;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken;
|
use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken;
|
||||||
@ -64,7 +65,7 @@ class DoctrineTokenProvider implements TokenProviderInterface
|
|||||||
$paramValues = ['series' => $series];
|
$paramValues = ['series' => $series];
|
||||||
$paramTypes = ['series' => \PDO::PARAM_STR];
|
$paramTypes = ['series' => \PDO::PARAM_STR];
|
||||||
$stmt = $this->conn->executeQuery($sql, $paramValues, $paramTypes);
|
$stmt = $this->conn->executeQuery($sql, $paramValues, $paramTypes);
|
||||||
$row = $stmt instanceof Result ? $stmt->fetchAssociative() : $stmt->fetch(\PDO::FETCH_ASSOC);
|
$row = $stmt instanceof Result || $stmt instanceof DriverResult ? $stmt->fetchAssociative() : $stmt->fetch(\PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
if ($row) {
|
if ($row) {
|
||||||
return new PersistentToken($row['class'], $row['username'], $series, $row['value'], new \DateTime($row['last_used']));
|
return new PersistentToken($row['class'], $row['username'], $series, $row['value'], new \DateTime($row['last_used']));
|
||||||
|
Reference in New Issue
Block a user