-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Symfony version(s) affected
6.1/6.2 tested
Description
@chalasr I can now reproduce this - but I dont know if we consider this a bug - or correctly reporting what "happened".
Forked from #47992 (comment)
How to reproduce
composer create-project symfony/symfony-demo reproducer
cd reproducer
composer req symfony/messenger
(no manual configuration of messenger, just install it with composer req!)
and then send an email in the BlogController::index function (for the fun of it)
public function index(Request $request, int $page, string $_format, PostRepository $posts, TagRepository $tags,
MailerInterface $mailer): Response
{
$email = new Email();
$email->from('phil@localhost')
->to('phil@localhost')
->subject('mySubject')
->text('myText');
$mailer->send($email);
Then visit the blog route in a browser..
Then check the profiler and you see TWO emails ... 1 queued and 1 sent.
Possible Solution
I suppose this could be correct, it's queued to the bus and then sent, but do we consider this a bug in the profiler that says that there are 2 emails? maybe a solution is to remove the reporting of a queued email if it then went on to be sent.
If this is all expected behaviour and Im creating noise and false bug reports then thats cool too - Im sorry, let's just close this. At least it proves Im testing 6.2 ;-)
Additional Context
Forked from #47992 (comment)