Introduce handler resolver - #327
Conversation
vjik
commented
Aug 14, 2026
| Q | A |
|---|---|
| Is bugfix? | ❌ |
| New feature? | ❌ |
| Breaks BC? | ✔️ |
| Tests pass? | ✔️ |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #327 +/- ##
============================================
- Coverage 92.51% 92.42% -0.09%
- Complexity 379 382 +3
============================================
Files 55 59 +4
Lines 988 1017 +29
============================================
+ Hits 914 940 +26
- Misses 74 77 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| if (is_callable($definition)) { | ||
| return $definition; | ||
| } |
There was a problem hiding this comment.
Duplicates the new check on line 40
There was a problem hiding this comment.
CallableFactory is used in MiddlewareFactory also. Left for future refactoring.
| return $definition; | ||
| } | ||
|
|
||
| if (is_string($definition)) { |
There was a problem hiding this comment.
Previously it was possible to use callables. Now it always looks into container in case of strings. Worth keeping previous behavior?
| if (is_string($definition)) { | |
| if (is_string($definition) && $this->container->has($definition)) { |
|
|
||
| namespace Yiisoft\Queue\Message; | ||
|
|
||
| interface MessageHandlerInterface |
There was a problem hiding this comment.
Still used in README and guide.
| if (is_string($definition)) { | ||
| return $this->getHandlerFromContainer($messageType, $definition); | ||
| } |
There was a problem hiding this comment.
Needs fallback to callable resolver