Require non-empty message type - #328
Open
vjik wants to merge 2 commits into
Open
Conversation
vjik
commented
Sep 4, 2026
Member
| Q | A |
|---|---|
| Is bugfix? | ❌ |
| New feature? | ❌ |
| Breaks BC? | ✔️ |
| Tests pass? | ✔️ |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 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
GenericMessageand 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.
samdark
approved these changes
Sep 4, 2026
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.