-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add output of debug:messenger information on Messenger doc #13390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I was wondering if it makes sense to change all the examples on that page to cope with the |
@Nyholm could you please review this proposal? Thanks! |
@@ -68,6 +68,34 @@ Concepts | |||
to use for transport, markers identifying a received message or any sort of | |||
metadata your middleware or transport layer may use. | |||
|
|||
**Message** | |||
There is no specific requirement for a message, it can be any kind of object except it | |||
should be serializable and unserializable by a Symfony Serializer instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually not. Native serialization mechanism is used by default
I like the part of "Debugging the Messenger". But Im not sure the other changes are needed. |
Message | ||
------- | ||
Message is a serializable object that holds the data that will be dispatched. It does not need | ||
to extend a class or implement an interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interface::
And remove the next Example line please
|
||
namespace App\Message; | ||
|
||
class MyMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opening bracket should be on the next line
|
||
class MyMessage { | ||
|
||
protected $name = 'name'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add string typehint
|
||
protected $name = 'name'; | ||
|
||
public function __construct(string $name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Name property has a default value, why is it needed to provide a name in this example?
Can we remove the default from the property?
use Symfony\Component\Mailer\MailerInterface; | ||
use Symfony\Component\Messenger\Envelope; | ||
use Symfony\Component\Messenger\Transport\Sender\SenderInterface; | ||
use Symfony\Component\Mime\Email; | ||
|
||
class ImportantActionToEmailSender implements SenderInterface | ||
class MyMessageToEmailSender implements SenderInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep the old name
Friendly ping |
Hi! Thank you for initiating this PR! Unfortunately, there hasn't been much activity on this PR for the past months. So I'm going to close this PR. Feel free to comment (to reopen) or open a new PR with the feedback applied. As for #13310, I could not see the relation with this PR (the PHPdoc description is not shown). I've created #14567 to add a small tip about the feature mentioned in the issue. |
fixes #13310 :
MyMessage
to support Examples;debug:messenger
output makes sense;