Skip to content

Update for queue message API changes#135

Merged
samdark merged 3 commits into
masterfrom
fix-queue-message-api
Jul 9, 2026
Merged

Update for queue message API changes#135
samdark merged 3 commits into
masterfrom
fix-queue-message-api

Conversation

@samdark

@samdark samdark commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

  • update AMQP adapter and tests to the new queue message serializer namespace
  • migrate test messages from data/metadata terminology to payload/meta
  • update middleware tests for the current Queue constructor API

Tests

  • make test v=82
  • make static-analyze v=82

Copilot AI review requested due to automatic review settings July 9, 2026 08:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates this AMQP adapter package to align with recent yiisoft/queue message API changes, primarily around the new serializer namespace and the shift from data/metadata to payload/meta in message handling, plus aligning middleware-related tests with the current Queue construction API.

Changes:

  • Migrated usages of JsonMessageSerializer to MessageSerializer + JsonMessageEncoder, and updated MessageSerializerInterface import namespace.
  • Updated test message helpers/handlers and tests from getData()/getMetadata() + fromData() to getPayload()/getMeta() + fromPayload().
  • Adjusted middleware integration test queue construction to pass the default queue name and middleware definitions via constructor.

Reviewed changes

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

Show a summary per file
File Description
tests/yii Updates test CLI bootstrap to use the new serializer classes.
tests/Unit/UnitTestCase.php Switches handler logic to getPayload() and updates serializer instantiation.
tests/Unit/QueueTest.php Migrates unit tests to fromPayload() and new serializer classes/namespaces.
tests/Unit/QueueSettingsTest.php Updates serializer instantiation and message factory usage in settings tests.
tests/Unit/QueueProviderTest.php Updates serializer usage and adjusts decoded message body assertion to the new top-level payload key.
tests/Unit/DelayMiddlewareTest.php Migrates unit middleware tests to fromPayload().
tests/Support/TestMessage.php Updates the test message implementation to the new payload/meta API.
tests/Support/SimpleMessageHandler.php Switches handler to read message payload instead of data.
tests/Support/FakeAdapter.php Updates serializer interface import namespace.
tests/Support/ExtendedSimpleMessageHandler.php Switches handler to read message payload instead of data.
tests/Integration/DelayMiddlewareTest.php Updates serializer usage and aligns queue construction with current Queue constructor API for middlewares.
tests/Integration/ConsumeExistingMessagesTest.php Migrates integration tests to new serializer and payload-based message creation.
tests/Benchmark/QueuePushBench.php Updates benchmark setup and message creation to new serializer/payload API.
tests/Benchmark/QueueConsumeBench.php Updates benchmark setup and message creation to new serializer/payload API.
src/ExistingMessagesConsumer.php Updates serializer interface import namespace.
src/Adapter.php Updates serializer interface import namespace.

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

@samdark samdark merged commit 0ebc0ca into master Jul 9, 2026
21 checks passed
@samdark samdark deleted the fix-queue-message-api branch July 9, 2026 08:29
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