Skip to content
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

[Mailer] Fix BC breaking event name change #47992

Merged
merged 1 commit into from
Oct 26, 2022

Conversation

chalasr
Copy link
Member

@chalasr chalasr commented Oct 25, 2022

Q A
Branch? 6.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #47989, Fix #47383
License MIT
Doc PR -

While I get the motivation for introducing this QueuingMessageEvent child event in #47191, it's a BC break that is difficult to circumvent due to the fact it's an event (the parent may still be used as it's not deprecated).
So I propose to revert its addition and just add the needed stamp-related methods to the original event instead.

@nesl247
Copy link

nesl247 commented Oct 25, 2022

@chalasr will this fix #47383 as well like I think it will?

@chalasr
Copy link
Member Author

chalasr commented Oct 25, 2022

@nesl247 Yes it does, thanks for noticing and testing dev branches.

@chalasr chalasr force-pushed the fix-mailer-msgevent-name branch 2 times, most recently from aec4b00 to 0b3b3df Compare October 26, 2022 09:30
@fabpot
Copy link
Member

fabpot commented Oct 26, 2022

Thank you @chalasr.

@fabpot fabpot merged commit 3b4cda1 into symfony:6.2 Oct 26, 2022
@chalasr chalasr deleted the fix-mailer-msgevent-name branch October 26, 2022 09:56
@PhilETaylor
Copy link
Contributor

Sorry to hijack this thread, but wanted to confirm that after this merge, the profiler is still confused and showing 2 emails sent in the left menu and 1 queued and 1 sent.

Is this on purpose or something else that needs fixing?

My code is only sending one email.

  $message = new Email();
        $message->to('phil@phil-taylor.com')
            ->from('phil@phil-taylor.com')
            ->subject('Mailer Test')
            ->text('This is just a test');

        $mailer->send($message);

Screenshot 2022-10-26 at 11 40 27

@chalasr
Copy link
Member Author

chalasr commented Oct 26, 2022

I'll have a look today, thanks for telling us.

@chalasr
Copy link
Member Author

chalasr commented Oct 26, 2022

@PhilETaylor I can't reproduce on a basic setup sorry, I get only one queued email reported in the profiler panel. Please make sure it's not an issue in your code and if it's not, consider opening an issue with a minimal application that allows reproducing the issue. Thanks

@PhilETaylor
Copy link
Contributor

PhilETaylor commented Oct 26, 2022

yes, 30 seconds ago I tested my symfony demo site and I could also not reproduce it - dang it! Sorry for wasting your time, I'll dig deeper.

The [main] transport is confusing though, as my only transport is the smtp://mailhog... one...

edit: Should also say, 6.1 gives only 1 email in the profiler, not 2 - dang it :) :)

@PhilETaylor
Copy link
Contributor

ok I fired up the laptop which has never seen 6.2 and now I can replicate my issue in my app only in 6.1.4 - sorry for the noise... only one email is every sent to the MAILER_DSN but something is also queuing an email - ill shut up now and go debug more ... sorry for wasting your time on this side show.

@fabpot fabpot mentioned this pull request Oct 28, 2022
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull request Jan 13, 2023
This PR was merged into the 6.2 branch.

Discussion
----------

[Mailer] remove `QueuingMessageEvent`

Related to [47992 in code](symfony/symfony#47992) - QueuingMessageEvent class has been removed due to BC break

Related to symfony#17111 in doc

Remove explanations about this specific event but keep new methods added in previously existing MessageEvent

Commits
-------

9bc26d1 remove QueuingMessageEvent from documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants