You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Queue/Connectors/RabbitMQConnector.php
+32-29Lines changed: 32 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -38,42 +38,45 @@ public function connect(array $config): Queue
38
38
thrownew \LogicException('The factory_class option is missing though it is required.');
39
39
}
40
40
41
-
$factoryClass = $config['factory_class'];
42
-
if (false === class_exists($factoryClass) || false === (new \ReflectionClass($factoryClass))->implementsInterface(InteropAmqpConnectionFactory::class)) {
43
-
thrownew \LogicException(sprintf('The factory_class option has to be valid class that implements "%s"', InteropAmqpConnectionFactory::class));
44
-
}
41
+
// for reconnecting...
42
+
$build_context_fn = function() use ($config) {
43
+
$factoryClass = $config['factory_class'];
44
+
if (false === class_exists($factoryClass) || false === (new \ReflectionClass($factoryClass))->implementsInterface(InteropAmqpConnectionFactory::class)) {
45
+
thrownew \LogicException(sprintf('The factory_class option has to be valid class that implements "%s"', InteropAmqpConnectionFactory::class));
0 commit comments