From ce02c43ff2c2228d5a85aced11c7be39ffb06678 Mon Sep 17 00:00:00 2001 From: Adam Bramley Date: Fri, 1 Mar 2024 10:54:31 +1100 Subject: [PATCH] Catch TableNotFoundException in MySQL delete --- .../Messenger/Bridge/Doctrine/Transport/Connection.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php index cf43be1cb8f99..3a50e2a2f0122 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php @@ -157,6 +157,10 @@ public function get(): ?array $this->driverConnection->delete($this->configuration['table_name'], ['delivered_at' => '9999-12-31 23:59:59']); } catch (DriverException $e) { // Ignore the exception + } catch (TableNotFoundException) { + if ($this->autoSetup) { + $this->setup(); + } } }