Open speller opened 1 year ago
Hi @speller. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Description
Add support for plain objects with promoted properties in message queue communication.
PHP 8 allows to use the following immutable data objects with promoted properties:
This allows to keep the user code clean by using modern language features with less code doing the same as old-styled code with regular constructor properties and getter methods.
But I can not add this object to the
communication.xml
file as-is:The resulting emitted message body will be empty.
The workaround is to use a custom encoder and markup such classes somehow. For example, use a marker interface:
Expected behavior
I'm able to use a data class with promoted properties without workarounds.
Benefits
Better user code quality
Additional information
No response
Release note
No response