Skip to content

Require non-empty message type - #328

Open
vjik wants to merge 2 commits into
masterfrom
non-empty-message-type
Open

Require non-empty message type#328
vjik wants to merge 2 commits into
masterfrom
non-empty-message-type

Conversation

@vjik

@vjik vjik commented Sep 4, 2026

Copy link
Copy Markdown
Member
Q A
Is bugfix?
New feature?
Breaks BC? ✔️
Tests pass? ✔️

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.51%. Comparing base (ecec699) to head (7c8c129).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #328   +/-   ##
=========================================
  Coverage     92.51%   92.51%           
  Complexity      381      381           
=========================================
  Files            59       59           
  Lines          1015     1016    +1     
=========================================
+ Hits            939      940    +1     
  Misses           76       76           

☔ View full report in Codecov by Harness.
📢 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.

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.

🟢 Approval recommended

Validation, static contracts, tests, and documentation consistently enforce the intended invariant.

Pull request overview

Enforces non-empty message types across message creation, serialization, contracts, and documentation.

Changes:

  • Validates message types in GenericMessage and deserialization.
  • Adds Psalm non-empty-string contracts.
  • Removes redundant handler-resolver validation and updates docs/tests.
File summaries
File Description
src/Message/GenericMessage.php Rejects empty types.
src/Message/MessageInterface.php Defines non-empty type contract.
src/Message/Serializer/MessageSerializer.php Validates deserialized types.
src/Message/Handler/HandlerResolver.php Relies on the upstream contract.
src/Message/ClassResolver/MessageClassResolverInterface.php Narrows resolver input contract.
tests/Unit/Message/GenericMessageTest.php Tests message validation.
tests/Unit/Message/Serializer/MessageSerializerTest.php Tests deserialization validation.
tests/Unit/Message/Handler/Resolver/HandlerResolverTest.php Removes obsolete validation test.
docs/guide/en/messages-and-handlers.md Documents the requirement.
docs/guide/en/message-handler-advanced.md Documents custom type requirements.
docs/guide/en/migrating-from-yii2-queue.md Updates migration guidance.
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vjik
vjik requested a review from a team September 4, 2026 09:02
@vjik vjik added the status:code review The pull request needs review. label Sep 4, 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.

3 participants