Skip to content

Introduce QueueProviderInterface::getNames() method#265

Open
vjik wants to merge 5 commits intomasterfrom
get-names
Open

Introduce QueueProviderInterface::getNames() method#265
vjik wants to merge 5 commits intomasterfrom
get-names

Conversation

@vjik
Copy link
Member

@vjik vjik commented Mar 21, 2026

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

@codecov
Copy link

codecov bot commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.59%. Comparing base (37141e6) to head (4abbad5).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #265      +/-   ##
============================================
+ Coverage     98.57%   98.59%   +0.02%     
- Complexity      366      372       +6     
============================================
  Files            48       48              
  Lines           983      998      +15     
============================================
+ Hits            969      984      +15     
  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

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 introduces a new QueueProviderInterface::getNames() API to expose configured queue names, and updates queue providers and CLI commands to use it for default queue argument values.

Changes:

  • Add QueueProviderInterface::getNames(): array and implement it across all built-in queue providers and the debug proxy.
  • Update RunCommand and ListenAllCommand to default their queue argument to $queueProvider->getNames() (removing the injected $queues constructor argument).
  • Add/adjust unit tests to cover getNames() across providers and proxy, and update command tests accordingly.

Reviewed changes

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

Show a summary per file
File Description
src/Provider/QueueProviderInterface.php Adds getNames() to the provider contract.
src/Provider/QueueFactoryProvider.php Caches and returns definition keys via getNames().
src/Provider/PredefinedQueueProvider.php Returns array_keys($this->queues) via getNames().
src/Provider/CompositeQueueProvider.php Aggregates names from child providers (needs empty-case fix).
src/Provider/AdapterFactoryQueueProvider.php Caches and returns adapter definition keys via getNames().
src/Debug/QueueProviderInterfaceProxy.php Delegates getNames() to the underlying provider.
src/Command/RunCommand.php Removes injected queues list; defaults CLI args from getNames().
src/Command/ListenAllCommand.php Removes injected queues list; defaults CLI args from getNames().
config/di.php Removes obsolete DI wiring for the removed $queues constructor args.
tests/Unit/Provider/QueueFactoryProviderTest.php Adds getNames() tests.
tests/Unit/Provider/PredefinedQueueProviderTest.php Adds getNames() tests.
tests/Unit/Provider/CompositeQueueProviderTest.php Adds getNames() tests (including empty/dupe cases).
tests/Unit/Provider/AdapterFactoryQueueProviderTest.php Adds getNames() tests.
tests/Unit/Debug/QueueProviderInterfaceProxyTest.php Adds proxy getNames() test.
tests/Unit/Command/RunCommandTest.php Partially updates default-queue test to new behavior/signature (needs further fixes).
tests/Unit/Command/ListenAllCommandTest.php Updates to new constructor signature using PredefinedQueueProvider.

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

@vjik vjik requested a review from a team March 21, 2026 05:43
@vjik vjik added the status:code review The pull request needs review. label Mar 21, 2026
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.

2 participants