Skip to content

Remove PushRequest#268

Open
vjik wants to merge 2 commits intomasterfrom
push-request
Open

Remove PushRequest#268
vjik wants to merge 2 commits intomasterfrom
push-request

Conversation

@vjik
Copy link
Copy Markdown
Member

@vjik vjik commented Apr 18, 2026

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

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.48%. Comparing base (5a4edad) to head (221018e).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #268      +/-   ##
============================================
- Coverage     98.51%   98.48%   -0.03%     
+ Complexity      354      350       -4     
============================================
  Files            46       45       -1     
  Lines           942      926      -16     
============================================
- Hits            928      912      -16     
  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 removes the PushRequest abstraction from the push middleware pipeline, shifting the push middleware/handler contracts to operate directly on MessageInterface and updating the queue push flow and tests accordingly.

Changes:

  • Replace PushRequest-based push middleware/handler APIs with MessageInterface-based APIs.
  • Update Queue::push() and AdapterPushHandler to push messages directly via a fixed adapter instance.
  • Refactor unit/integration tests to use MessageInterface and remove PushRequest-specific tests.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Queue.php Updates push flow to dispatch MessageInterface and constructs AdapterPushHandler with the queue’s adapter.
src/Middleware/Push/PushRequest.php Removes the PushRequest value object.
src/Middleware/Push/PushMiddlewareDispatcher.php Changes dispatcher to accept/return MessageInterface.
src/Middleware/Push/MiddlewarePushStack.php Updates stack handler signature to accept/return MessageInterface.
src/Middleware/Push/MiddlewarePushInterface.php Changes middleware contract to processPush(MessageInterface, ...).
src/Middleware/Push/MessageHandlerPushInterface.php Changes handler contract to handlePush(MessageInterface): MessageInterface.
src/Middleware/Push/MiddlewareFactoryPush.php Updates callable wrapping/invocation to pass message + handler and expect MessageInterface.
src/Middleware/Push/AdapterPushHandler.php Refactors handler to push via injected adapter and return the pushed message.
src/Middleware/Push/Implementation/IdMiddleware.php Updates middleware implementation to work directly with MessageInterface.
tests/Unit/Middleware/Push/Support/TestMiddleware.php Updates test middleware to new push middleware signature.
tests/Unit/Middleware/Push/Support/TestCallableMiddleware.php Updates callable middleware signature to accept/return MessageInterface.
tests/Unit/Middleware/Push/PushRequestTest.php Removes PushRequest immutability test.
tests/Unit/Middleware/Push/MiddlewareFactoryTest.php Updates factory tests to assert message-based middleware behavior.
tests/Unit/Middleware/Push/MiddlewareDispatcherTest.php Updates dispatcher tests to message-based pipeline behavior.
tests/Unit/Middleware/Push/Implementation/IdMiddlewareTest.php Updates IdMiddleware tests to message-based inputs/outputs.
tests/Unit/Middleware/Push/AdapterPushHandlerTest.php Updates handler test to construct handler with adapter and push messages directly.
tests/Integration/Support/TestMiddleware.php Updates integration test middleware to new push signature.

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

Comment thread src/Middleware/Push/PushMiddlewareDispatcher.php
Comment thread src/Queue.php
@vjik vjik requested a review from a team April 18, 2026 18:32
@vjik vjik added the status:code review The pull request needs review. label Apr 18, 2026
@samdark samdark requested a review from viktorprogger April 18, 2026 18:52
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