From 047854cf2c53119803eff3c98eedc71666edc30c Mon Sep 17 00:00:00 2001 From: W0rma Date: Tue, 9 Dec 2025 15:28:14 +0100 Subject: [PATCH] Ensure BC if the class is extended and the reconnect parameter is not defined --- src/Codeception/Module/AMQP.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Codeception/Module/AMQP.php b/src/Codeception/Module/AMQP.php index ff70cd9..41b85d7 100644 --- a/src/Codeception/Module/AMQP.php +++ b/src/Codeception/Module/AMQP.php @@ -100,7 +100,8 @@ public function _before(TestInterface $test): void $this->cleanup(); } - if ($this->config['reconnect']) { + // Nullsafe can be removed if the class is made final + if ($this->config['reconnect'] ?? false) { $this->getChannel()->getConnection()->reconnect(); } }