-
Notifications
You must be signed in to change notification settings - Fork 29
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
Debug Sylius Mailer command #223
base: 2.1
Are you sure you want to change the base?
Conversation
3caab76
to
8e56506
Compare
bc26212
to
05c9ae4
Compare
05c9ae4
to
0383dc0
Compare
Co-authored-by: Olivier ALLAIN <oallain@users.noreply.github.com>
<directory>./src/Bundle/tests/</directory> | ||
|
||
<exclude>./src/Bundle/tests/Integration/Cli/</exclude> | ||
</testsuite> |
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.
<directory>./src/Bundle/tests/</directory> | |
<exclude>./src/Bundle/tests/Integration/Cli/</exclude> | |
</testsuite> | |
<directory>./src/Bundle/tests/</directory> | |
<exclude>./src/Bundle/tests/Integration/Cli/</exclude> | |
</testsuite> |
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.
👌
$dumper->dump($input, $output); | ||
} | ||
|
||
return 0; |
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.
return Command::SUCCESS
💃
foreach ($this->dumpers as $dumper) { | ||
$dumper->dump($input, $output); | ||
} | ||
|
||
return 0; |
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.
What would you say for extracting it to the $this->dumpAllEmails
function? And $this->dumpEmailDetails
below? we would have a nice 5-lines long execute
function here 🚀
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Paweł Jędrzejewski |
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.
Should be changed and will be after merging #233 👌
updated version of #201
I was playing with SyliusMailerBundle a little bit yesterday and wanted to get information about emails that are configured. As it is a project using Sylius with some customizations, my first thought was "so what, I'm gonna browse yaml files like some kind of animal?!". My second thought was "but I can use
debug:config sylius_mailer
command to dump the bundle configuration which did the trick but looked rough and ugly.So my final resolution was - what if we have a nice debug command for the configured emails? And I wrote it. There are obviously a lot of things to improve (I still don't know if dumping the email template brings any value 🤷♂️), but looks nicer 🚀
Let me know what you think about it 🫡
PS. Thanks @loic425 for the inspiration with debug serializer command - I definitely belive following the "it's useful for me, maybe it's useful for others" path is a good idea 🖖