8000 Merge branch '3.4' into 4.4 · lucasaba/symfony@cbb0b1d · GitHub
[go: up one dir, main page]

Skip to content

Commit cbb0b1d

Browse files
Merge branch '3.4' into 4.4
* 3.4: [HttpFoundation] skip tests when the IANA server is throttling the list of status codes [DoctrineBridge] fix DBAL v3 compat
2 parents 7529d13 + feaa9a6 commit cbb0b1d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
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']));

src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,11 @@ public function ianaCodesReasonPhrasesProvider()
10231023
],
10241024
]);
10251025

1026-
$ianaHttpStatusCodes->loadXML(file_get_contents('https://www.iana.org/assignments/http-status-codes/http-status-codes.xml', false, $context));
1026+
if (!$rawStatusCodes = file_get_contents('https://www.iana.org/assignments/http-status-codes/http-status-codes.xml', false, $context)) {
1027+
$this->markTestSkipped('The IANA server is throttling the list of status codes');
1028+
}
1029+
1030+
$ianaHttpStatusCodes->loadXML($rawStatusCodes);
10271031
if (!$ianaHttpStatusCodes->relaxNGValidate(__DIR__.'/schema/http-status-codes.rng')) {
10281032
self::fail('Invalid IANA\'s HTTP status code list.');
10291033
}

0 commit comments

Comments
 (0)
0