Introduce PushMiddlewareConfig + Refactor and make internal PushMiddlewareDispatcher#283
Introduce PushMiddlewareConfig + Refactor and make internal PushMiddlewareDispatcher#283
PushMiddlewareConfig + Refactor and make internal PushMiddlewareDispatcher#283Conversation
vjik
commented
May 2, 2026
| Q | A |
|---|---|
| Is bugfix? | ❌ |
| New feature? | ❌ |
| Breaks BC? | ✔️ |
| Tests pass? | ✔️ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #283 +/- ##
============================================
+ Coverage 98.37% 98.39% +0.02%
- Complexity 322 324 +2
============================================
Files 47 48 +1
Lines 860 873 +13
============================================
+ Hits 846 859 +13
Misses 14 14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR refactors push middleware setup by introducing PushMiddlewareConfig (factory + common middleware) and making PushMiddlewareDispatcher an internal implementation detail used by Queue, resulting in a BC-breaking constructor change.
Changes:
- Replace
Queue’s constructor dependency fromPushMiddlewareDispatchertoPushMiddlewareConfig. - Refactor
PushMiddlewareDispatcherto keep the finish handler internally and updatedispatch()to no longer accept it as an argument. - Update DI config, docs, benchmarks, and tests to use
PushMiddlewareConfigand the newdispatch()signature.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/Middleware/Push/PushMiddlewareConfig.php |
Adds new config object holding push middleware factory + common middleware definitions. |
src/Middleware/Push/PushMiddlewareDispatcher.php |
Makes dispatcher internal to Queue, changes constructor/dispatch signature, adds finish-handler cloning support. |
src/Queue.php |
Switches to PushMiddlewareConfig, builds base dispatcher internally, updates cloning and dispatch usage. |
config/di.php |
Updates container wiring to provide PushMiddlewareConfig from params. |
docs/guide/en/synchronous-mode.md |
Updates example to fetch/pass PushMiddlewareConfig. |
docs/guide/en/configuration-manual.md |
Updates manual configuration example to use PushMiddlewareConfig. |
tests/Unit/Middleware/Push/MiddlewareDispatcherTest.php |
Updates unit tests to new dispatcher constructor and dispatch($message) API. |
tests/TestCase.php |
Updates test queue creation to pass PushMiddlewareConfig. |
tests/Integration/MiddlewareTest.php |
Updates integration test wiring to use PushMiddlewareConfig. |
tests/Benchmark/QueueBench.php |
Updates benchmark queue wiring to use PushMiddlewareConfig. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.