8000 Merge branch '6.4' into 7.0 · symfony/symfony@fdf8ad7 · GitHub
[go: up one dir, main page]

Skip to content

Commit fdf8ad7

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: 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 28cc56d + 36c718a commit fdf8ad7

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
@@ -283,7 +283,7 @@ protected function doSave(array $values, int $lifetime): array|bool
283283
$lifetime = $lifetime ?: null;
284284
try {
285285
$stmt = $conn->prepare($sql);
286-
} catch (\PDOException) {
286+
} catch (\PDOException $e) {
287287
if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) {
288288
$this->createTable();
289289
}
@@ -318,7 +318,7 @@ protected function doSave(array $values, int $lifetime): array|bool
318318
foreach ($values as $id => $data) {
319319
try {
320320
$stmt->execute();
321-
} catch (\PDOException) {
321+
} catch (\PDOException $e) {
322322
if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) {
323323
$this->createTable();
324324
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function save(Key $key): void
9191
$conn = $this->getConnection();
9292
try {
9393
$stmt = $conn->prepare($sql);
94-
} catch (\PDOException) {
94+
} catch (\PDOException $e) {
9595
if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) {
9696
$this->createTable();
9797
}
@@ -103,7 +103,7 @@ public function save(Key $key): void
103103

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

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,15 +1047,6 @@ public function testCollectDenormalizationErrors(?ClassMetadataFactory $classMet
10471047
'useMessageForUser' => false,
10481048
'message' => 'The type of the "something" attribute for class "Symfony\Component\Serializer\Tests\Fixtures\Php74FullWithTypedConstructor" must be one of "float" ("string" given).',
10491049
],
1050-
[
1051-
'currentType' => 'string',
1052-
'expectedTypes' => [
1053-
'float',
1054-
],
1055-
'path' => 'php74FullWithTypedConstructor.something',
1056-
'useMessageForUser' => false,
1057-
'message' => 'The type of the "something" attribute for class "Symfony\Component\Serializer\Tests\Fixtures\Php74FullWithTypedConstructor" must be one of "float" ("string" given).',
1058-
],
10591050
[
10601051
'currentType' => 'string',
10611052
'expectedTypes' => [

0 commit comments

Comments
 (0)
0