Skip to content

Introduce PushMiddlewareConfig + Refactor and make internal PushMiddlewareDispatcher#283

Merged
vjik merged 5 commits intomasterfrom
stack-cache
May 3, 2026
Merged

Introduce PushMiddlewareConfig + Refactor and make internal PushMiddlewareDispatcher#283
vjik merged 5 commits intomasterfrom
stack-cache

Conversation

@vjik
Copy link
Copy Markdown
Member

@vjik vjik commented May 2, 2026

Q A
Is bugfix?
New feature?
Breaks BC? ✔️
Tests pass? ✔️

@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.39%. Comparing base (b556717) to head (e1b82d5).
⚠️ Report is 2 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 from PushMiddlewareDispatcher to PushMiddlewareConfig.
  • Refactor PushMiddlewareDispatcher to keep the finish handler internally and update dispatch() to no longer accept it as an argument.
  • Update DI config, docs, benchmarks, and tests to use PushMiddlewareConfig and the new dispatch() 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.

Comment thread src/Queue.php
Comment thread src/Middleware/Push/PushMiddlewareDispatcher.php Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/Middleware/Push/PushMiddlewareDispatcher.php
@vjik vjik requested a review from a team May 2, 2026 18:40
@vjik vjik added the status:code review The pull request needs review. label May 2, 2026
@vjik vjik merged commit d752f00 into master May 3, 2026
30 of 33 checks passed
@vjik vjik deleted the stack-cache branch May 3, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants