Skip to content

Improve push middleware dispatch#278

Merged
vjik merged 5 commits intomasterfrom
improve-dispatch
May 2, 2026
Merged

Improve push middleware dispatch#278
vjik merged 5 commits intomasterfrom
improve-dispatch

Conversation

@vjik
Copy link
Copy Markdown
Member

@vjik vjik commented May 1, 2026

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

@vjik vjik requested a review from a team May 1, 2026 17:17
@vjik vjik added the status:code review The pull request needs review. label May 1, 2026
@samdark samdark requested a review from Copilot May 1, 2026 17:30
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

Refactors the push middleware execution path to avoid nested dispatching by pre-combining base dispatcher middleware with queue-specific middleware, updating integration coverage to validate the full composed pipeline order.

Changes:

  • Queue now prepares a per-queue push dispatcher by combining base dispatcher middleware with queue-specific middleware.
  • PushMiddlewareDispatcher adds withMiddlewaresAdded() to append middleware definitions to an existing dispatcher instance.
  • Integration test updates the expected push middleware stack to cover additional appended middleware.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/Integration/MiddlewareTest.php Extends the integration test to validate appended push middleware order with an extra stage.
src/Queue.php Switches push dispatching to a prepared combined dispatcher and removes the nested dispatcher handler.
src/Middleware/Push/PushMiddlewareDispatcher.php Adds withMiddlewaresAdded() API for appending middleware definitions and adjusts callable signature docs for push middleware.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Queue.php Outdated
@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.37%. Comparing base (3af8d68) to head (50e07db).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #278      +/-   ##
============================================
- Coverage     98.38%   98.37%   -0.02%     
- Complexity      321      322       +1     
============================================
  Files            47       47              
  Lines           868      860       -8     
============================================
- Hits            854      846       -8     
  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.

@vjik vjik merged commit 93ad731 into master May 2, 2026
27 of 29 checks passed
@vjik vjik deleted the improve-dispatch branch May 2, 2026 15:42
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