Drupal 10.2
PHP 8.2
Deprecated function: Creation of dynamic property Drupal\symfony_mailer\Email::$_symfony_mailer_log is deprecated in Drupal\symfony_mailer_log\Plugin\EmailAdjuster\LogMail->postRender() (line 92 of modules/contrib/symfony_mailer_log/src/Plugin/EmailAdjuster/LogMail.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 3418117-12.patch | 591 bytes | sander wemagine |
| #5 | 3418117-5.patch | 509 bytes | jrochate |
| #3 | symfony_mailer_log-3418117.patch | 1015 bytes | abhishek_gupta1 |
Issue fork symfony_mailer_log-3418117
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
abhishek_gupta1 commentedComment #3
abhishek_gupta1 commented@jcontreras, fixed the issue and created Patch. please kindly review it.
Comment #4
jrochate commentedWhen I added this patch, I got another error and now it's fatal:
TypeError: Drupal\symfony_mailer_log\Plugin\EmailAdjuster\LogMail::Drupal\symfony_mailer_log\Plugin\EmailAdjuster\{closure}(): Argument #1 ($address) must be of type Drupal\symfony_mailer_log\Plugin\EmailAdjuster\AddressInterface, Drupal\symfony_mailer\Address given em Drupal\symfony_mailer_log\Plugin\EmailAdjuster\LogMail->Drupal\symfony_mailer_log\Plugin\EmailAdjuster\{closure}() (linha 124 de /var/www/(...)/web/modules/contrib/symfony_mailer_log/src/Plugin/EmailAdjuster/LogMail.php).Comment #5
jrochate commentedNow it works.
Comment #7
svendecabooterThe attached patch fixes an issue with the call to getLogger() - so I have committed it.
However, the original issue reported here is the fact that we set a dynamic property:
$email->_symfony_mailer_log = $log;This has not been resolved yet.
Comment #8
svendecabooterComment #11
justafishCreated an MR to fix the issue with the dynamic property - the LogMail object doesn't seem to get re-used when I stepped through it, so I stored the log object directly there, but maybe someone knows why that might be a bad idea 😅
Comment #12
sander wemagine commentedI've added a patch that removes the error for us. Hopefully it can help someone else as well (until the repo is updated)
Comment #14
svendecabooterComment #15
svendecabooterThanks justafish, that seems like the correct approach.
I have merged the MR now.