From 5178333d5c6372c87644664543f17557b007d038 Mon Sep 17 00:00:00 2001 From: gam6itko Date: Sat, 3 Jun 2023 17:39:22 +0300 Subject: [PATCH 1/2] FakeQueue fix job name as string --- src/Queue/FakeQueue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Queue/FakeQueue.php b/src/Queue/FakeQueue.php index 86692c1..3579c7b 100644 --- a/src/Queue/FakeQueue.php +++ b/src/Queue/FakeQueue.php @@ -107,7 +107,7 @@ public function push(string $name, array $payload = [], OptionsInterface $option { $this->jobs[$name][] = [ 'name' => $name, - 'handler' => $this->registry->getHandler($name), + 'handler' => class_exists($name) ? $this->registry->getHandler($name): null, 'payload' => $payload, 'options' => $options ?? new Options(), ]; From 6b92b37f31d3056b115bc609fdc1c0069cf56ed6 Mon Sep 17 00:00:00 2001 From: gam6itko Date: Sat, 3 Jun 2023 17:57:31 +0300 Subject: [PATCH 2/2] global namespace --- src/Queue/FakeQueue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Queue/FakeQueue.php b/src/Queue/FakeQueue.php index 3579c7b..028d189 100644 --- a/src/Queue/FakeQueue.php +++ b/src/Queue/FakeQueue.php @@ -107,7 +107,7 @@ public function push(string $name, array $payload = [], OptionsInterface $option { $this->jobs[$name][] = [ 'name' => $name, - 'handler' => class_exists($name) ? $this->registry->getHandler($name): null, + 'handler' => \class_exists($name) ? $this->registry->getHandler($name): null, 'payload' => $payload, 'options' => $options ?? new Options(), ];