Remove dead code#125
Open
viktorprogger wants to merge 2 commits into
Open
Conversation
Contributor
viktorprogger
commented
May 11, 2026
| Q | A |
|---|---|
| Is bugfix? | ✔️ |
| New feature? | ❌ |
| Breaks BC? | ✔️ |
| Fixed issues | ❌ |
samdark
approved these changes
May 12, 2026
There was a problem hiding this comment.
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/ExchangeSettingsdirectly (no longer depending on Adapter internals). - Deleted unused test/support and exception classes, and removed a redundant
QueueProviderhelper.
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') | |||
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.