Skip to content

[Mailer] Ensure TransportExceptionInterface populates stream debug data #59610

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

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

bytestream
Copy link
Contributor

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues
License MIT

There is a discrepancy when TransportExceptionInterface is thrown. Sometimes $e->getDebug() is '' and other times it contains information. Similarly, $transport->getStream()->getDebug(); sometimes returns '' because something else has already beaten you to the call...

This results in you having to do something like the following to get the debug log...

} catch (TransportExceptionInterface $e) {
    $log = $e->getDebug() ?: $transport->getStream()->getDebug();

This PR ensures that any TransportExceptionInterface thrown by send() sets the debug information. The notable case where this occurs is in handleAuth which is part of start (doHeloCommand).

@fabpot
Copy link
Member

fabpot commented Jan 25, 2025

Thank you @bytestream.

@fabpot fabpot merged commit 2f69270 into symfony:6.4 Jan 25, 2025
11 checks passed
This was referenced Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants