Skip to content

Commit 36c718a

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: name exception being caught as it is accessed in the catch block fix tests name exception being caught as it is accessed in the catch block
2 parents adec730 + ff29a1a commit 36c718a

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

src/Symfony/Component/Cache/Adapter/PdoAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ protected function doSave(array $values, int $lifetime): array|bool
285285
$lifetime = $lifetime ?: null;
286286
try {
287287
$stmt = $conn->prepare($sql);
288-
} catch (\PDOException) {
288+
} catch (\PDOException $e) {
289289
if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) {
290290
$this->createTable();
291291
}
@@ -320,7 +320,7 @@ protected function doSave(array $values, int $lifetime): array|bool
320320
foreach ($values as $id => $data) {
321321
try {
322322
$stmt->execute();
323-
} catch (\PDOException) {
323+
} catch (\PDOException $e) {
324324
if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) {
325325
$this->createTable();
326326
}

src/Symfony/Component/Lock/Store/PdoStore.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function save(Key $key)
9494
$conn = $this->getConnection();
9595
try {
9696
$stmt = $conn->prepare($sql);
97-
} catch (\PDOException) {
97+
} catch (\PDOException $e) {
9898
if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) {
9999
$this->createTable();
100100
}
@@ -106,7 +106,7 @@ public function save(Key $key)
106106

107107
try {
108108
$stmt->execute();
109-
} catch (\PDOException) {
109+
} catch (\PDOException $e) {
110110
if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) {
111111
$this->createTable();
112112

src/Symfony/Component/Serializer/Tests/SerializerTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,15 +1053,6 @@ public function testCollectDenormalizationErrors(?ClassMetadataFactory $classMet
10531053
'useMessageForUser' => false,
10541054
'message' => 'The type of the "something" attribute for class "Symfony\Component\Serializer\Tests\Fixtures\Php74FullWithTypedConstructor" must be one of "float" ("string" given).',
10551055
],
1056-
[
1057-
'currentType' => 'string',
1058-
'expectedTypes' => [
1059-
'float',
1060-
],
1061-
'path' => 'php74FullWithTypedConstructor.something',
1062-
'useMessageForUser' => false,
1063-
'message' => 'The type of the "something" attribute for class "Symfony\Component\Serializer\Tests\Fixtures\Php74FullWithTypedConstructor" must be one of "float" ("string" given).',
1064-
],
10651056
[
10661057
'currentType' => 'string',
10671058
'expectedTypes' => [

0 commit comments

Comments
 (0)