Skip to content

Commit 3dbadfe

Browse files
minor #62250 [Messenger] Fix unreachable catch (SerheyDolgushev)
This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [Messenger] Fix unreachable catch | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | n/a | License | MIT Fix for `PhanUnreachableCatch` [phan issues](https://github.com/phan/phan): ``` Catch statement for \Doctrine\DBAL\Exception\TableNotFoundException is unreachable. An earlier catch statement at line 168 caught the ancestor class/interface \Doctrine\DBAL\Driver\Exception ``` Commits ------- affca58 [Messenger] Fix unreachable catch
2 parents f3dc274 + affca58 commit 3dbadfe

File tree

1 file changed

+2
-2
lines changed
  • src/Symfony/Component/Messenger/Bridge/Doctrine/Transport

1 file changed

+2
-2
lines changed

src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ public function get(): ?array
166166
if ($this->driverConnection->getDatabasePlatform() instanceof MySQLPlatform) {
167167
try {
168168
$this->driverConnection->delete($this->configuration['table_name'], ['delivered_at' => '9999-12-31 23:59:59']);
169-
} catch (DriverException $e) {
170-
// Ignore the exception
171169
} catch (TableNotFoundException $e) {
172170
if ($this->autoSetup) {
173171
$this->setup();
174172
}
173+
} catch (DriverException $e) {
174+
// Ignore the exception
175175
}
176176
}
177177

0 commit comments

Comments
 (0)