Skip to content

Remove dead code#125

Open
viktorprogger wants to merge 2 commits into
adapt-to-queuefrom
remove-dead-code
Open

Remove dead code#125
viktorprogger wants to merge 2 commits into
adapt-to-queuefrom
remove-dead-code

Conversation

@viktorprogger
Copy link
Copy Markdown
Contributor

Q A
Is bugfix? ✔️
New feature?
Breaks BC? ✔️
Fixed issues

@viktorprogger viktorprogger self-assigned this May 11, 2026
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 dead/unused code paths from the AMQP adapter and simplifies tests accordingly, aligning the library with updated upstream interfaces and reducing maintenance surface area.

Changes:

  • Removed unused Adapter APIs (getQueueProvider(), withQueueProvider(), getChannel()) and corresponding unit test.
  • Simplified settings tests to instantiate QueueSettings/ExchangeSettings directly (no longer depending on Adapter internals).
  • Deleted unused test/support and exception classes, and removed a redundant QueueProvider helper.

Reviewed changes

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

Show a summary per file
File Description
tests/Unit/QueueTest.php Removes the Adapter immutability test that depended on removed Adapter APIs.
tests/Unit/QueueSettingsTest.php Simplifies testCommonSettings() to validate QueueSettings directly without Adapter/Provider.
tests/Unit/QueueProviderTest.php Renames a test to reflect queue-name behavior and updates the queue name fixture.
tests/Unit/ExchangeSettingsTest.php Simplifies testCommonSettings() to validate ExchangeSettings directly without Adapter/Provider.
tests/Support/FakeAdapter.php Deletes an unused fake adapter implementation.
src/QueueProvider.php Removes redundant channel-id helper/reset logic and simplifies channel creation.
src/Exception/NotImplementedException.php Deletes an unused exception class.
src/Adapter.php Removes unused public methods to match updated usage and reduce surface area.

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

Comment on lines 67 to 81
@@ -80,7 +80,7 @@ public function testWithChannelNameExchangeDeclaredException(): void
->withExchangeSettings(
new ExchangeSettings('yii-queue-test-with-channel-name')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants