Remove QueueInterface::withAdapter() and AdapterFactoryQueueProvider#266
Open
Remove QueueInterface::withAdapter() and AdapterFactoryQueueProvider#266
QueueInterface::withAdapter() and AdapterFactoryQueueProvider#266Conversation
Member
vjik
commented
Apr 2, 2026
| Q | A |
|---|---|
| Is bugfix? | ❌ |
| New feature? | ❌ |
| Breaks BC? | ✔️ |
| Tests pass? | ✔️ |
QueueInterface::withAdapter()QueueInterface::withAdapter() and AdapterFactoryQueueProvider
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #266 +/- ##
============================================
- Coverage 98.59% 98.51% -0.09%
+ Complexity 372 354 -18
============================================
Files 48 46 -2
Lines 998 942 -56
============================================
- Hits 984 928 -56
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 removes the queue “adapter injection” API (QueueInterface::withAdapter()), deletes the AdapterFactoryQueueProvider, and updates queue construction and push flow to assume an adapter is always present.
Changes:
- Removed
QueueInterface::withAdapter()and madeQueuerequire anAdapterInterfacevia constructor. - Removed
AdapterFactoryQueueProviderandAdapterNotConfiguredException, simplifying adapter configuration and error handling. - Updated middleware/push request flow and unit/integration tests to use non-null adapters and new queue construction patterns.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/QueueInterface.php |
Removes withAdapter() from the public queue interface. |
src/Queue.php |
Makes adapter mandatory (constructor) and removes adapter-not-configured checks and withAdapter(). |
src/Middleware/Push/PushRequest.php |
Makes adapter non-nullable in push requests; updates getter signature. |
src/Middleware/Push/AdapterPushHandler.php |
Removes “no adapter” exception path; always pushes via request adapter. |
src/Debug/QueueDecorator.php |
Drops withAdapter() passthrough now that the interface no longer defines it. |
src/Provider/AdapterFactoryQueueProvider.php |
Deletes the provider that built queues from adapter definitions. |
src/Exception/AdapterConfiguration/AdapterNotConfiguredException.php |
Deletes the exception that was thrown when using a queue without an adapter. |
stubs/StubQueue.php |
Removes withAdapter() support and simplifies stub implementation accordingly. |
tests/TestCase.php |
Updates queue factory helper to construct Queue with an adapter and name. |
tests/Unit/QueueTest.php |
Reworks tests to use createQueue($adapter) instead of withAdapter(). |
tests/Unit/Stubs/StubQueueTest.php |
Removes withAdapter() test coverage from stub queue tests. |
tests/Unit/Provider/AdapterFactoryQueueProviderTest.php |
Deletes tests for removed AdapterFactoryQueueProvider. |
tests/Unit/Middleware/Push/Implementation/IdMiddlewareTest.php |
Updates PushRequest instantiation to pass a non-null adapter. |
tests/Unit/Middleware/Push/AdapterPushHandlerTest.php |
Removes test expecting exception when adapter is missing. |
tests/Unit/Debug/QueueDecoratorTest.php |
Removes decorator withAdapter() tests now that method is gone. |
tests/Unit/Adapter/SynchronousAdapterTest.php |
Refactors adapter tests to instantiate SynchronousAdapter directly without queue withAdapter(). |
tests/Integration/MiddlewareTest.php |
Updates Queue constructor argument order (adapter before name). |
tests/App/DummyQueue.php |
Removes withAdapter() from dummy queue implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.