| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…avoid the conflict of property and getter.
There was a problem hiding this comment.
This PR addresses Hyperf issue #7634 by updating how AMQP message exchange types are converted to strings, ensuring delayed-exchange declarations respect overridden getType() implementations in subclasses.
Changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/amqp/src/Message/Message.php | Makes getTypeString() honor overridden getType() to avoid delayed-exchange type mismatches. |
| CHANGELOG-3.1.md | Records the change for the upcoming 3.1.68 release notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
|
|
||
| ## Optimized | ||
|
|
||
| - [#7741](https://github.com/hyperf/hyperf/pull/7741) Optimized the `Hyperf\Amqp\Message\Message::getTypeString()` method to prevent conflicts between property and getter methods. | ||
|
|
There was a problem hiding this comment.
This entry describes a bug fix for #7634 (incorrect delayed exchange type), so it likely belongs under the "## Fixed" section rather than "## Optimized" to keep release notes consistent with the rest of the changelog.
| ## Optimized | |
| - [#7741](https://github.com/hyperf/hyperf/pull/7741) Optimized the `Hyperf\Amqp\Message\Message::getTypeString()` method to prevent conflicts between property and getter methods. | |
| - [#7741](https://github.com/hyperf/hyperf/pull/7741) Fixed bug that the `Hyperf\Amqp\Message\Message::getTypeString()` method may conflict between property and getter methods. |
Sorry, something went wrong.
| $type = $this->getType(); | ||
| return $type instanceof Type ? $type->value : $type; |
There was a problem hiding this comment.
There are existing AMQP PHPUnit tests, but this behavior change (routing delayed exchange argument x-delayed-type now respecting overridden getType()) is not covered. Please add/adjust a test to assert that when a producer overrides getType() to return a different Type value, getTypeString() reflects it (and thus delayed exchange builder uses the expected string).
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
fix #7634