You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to (DKIM)signing emails, and have a couple, of observations/suggestions that might make the process easier to work with.
The DkimSigner's sign() method (and SMimeSigner's sign() method & SMimeEncrypter's encrypt() method, though I haven't used those) returns a Symfony\Component\Mime\Message but this can cause a problem when used to sign an object type that extends that Message class.
My specific problem was #53928 (Web profiler "Emails" tab breaks with signed emails) but I suppose other things might need to get the same object type back from the method as they passed to it) because the profiler was expecting an Email object but got a Message object.
Perhaps the PHP return type doesn't need changing, and the method logic could clone the passed $message and perform its operations on that clone, then return that clone? I'm not sure if PHP's return declarations are strict in that way, or whether it is allowed to return a class that extends the one in the return type.
I also don't know if something absolutely needs those methods to return a Message and not some other object that extends it.
Example
No response
The text was updated successfully, but these errors were encountered:
carsonbot
added
the
RFC
RFC = Request For Comments (proposals about features that you want to be discussed)
label
Feb 14, 2024
Description
I'm new to (DKIM)signing emails, and have a couple, of observations/suggestions that might make the process easier to work with.
The
DkimSigner
'ssign()
method (andSMimeSigner
'ssign()
method &SMimeEncrypter
'sencrypt()
method, though I haven't used those) returns aSymfony\Component\Mime\Message
but this can cause a problem when used to sign an object type that extends thatMessage
class.My specific problem was #53928 (Web profiler "Emails" tab breaks with signed emails) but I suppose other things might need to get the same object type back from the method as they passed to it) because the profiler was expecting an
Email
object but got aMessage
object.Perhaps the PHP return type doesn't need changing, and the method logic could clone the passed
$message
and perform its operations on that clone, then return that clone? I'm not sure if PHP's return declarations are strict in that way, or whether it is allowed to return a class that extends the one in the return type.I also don't know if something absolutely needs those methods to return a
Message
and not some other object that extends it.Example
No response
The text was updated successfully, but these errors were encountered: