Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Why is the return type of TransportInterface::send() nullable? #48512

Answered by MatTheCat
cheyder asked this question in Q&A
Discussion options

symfony/mailer

Does anyone know, why the TransportInterface::send() returns ?SentMessage? I couldn't find any implementation which would return null. If this could be strictly SentMessage it would save us some checks afterwards. Otherwise, if it is supposed to be nullable, does someone know what it is supposed to mean? Was the sending succesful, or occured any error?

You must be logged in to vote

Before #36467 send would return null if no recipient were set but, it now seems this can indeed no longer happen. You can try opening a PR but I’m not sure it’ll be considered worth it.

Replies: 1 comment 1 reply

Comment options

Before #36467 send would return null if no recipient were set but, it now seems this can indeed no longer happen. You can try opening a PR but I’m not sure it’ll be considered worth it.

You must be logged in to vote
1 reply
Comment options

Thanks! That's what I was looking for. I'll prepare a pr within the next days. Let's see if it'll considered worth it ;)

Answer selected by cheyder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /