Problem/Motivation

When sending a mail using the legacy builder on PHP 8.2:

Deprecated function: Creation of dynamic property Drupal\symfony_mailer\Plugin\EmailBuilder\LegacyEmailBuilder::$theme is deprecated in Drupal\symfony_mailer\Plugin\EmailBuilder\LegacyEmailBuilder->build() (line 112 of modules/contrib/symfony_mailer/src/Plugin/EmailBuilder/LegacyEmailBuilder.php).

Command icon 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

ptmkenny created an issue. See original summary.

ptmkenny’s picture

Status: Active » Needs review

Just need to declare $theme property as is done in Email.php.

AdamPS made their first commit to this issue’s fork.

  • AdamPS committed e5956b0b on 1.x authored by ptmkenny
    Issue #3343097 by ptmkenny: Dynamic property error on PHP 8.2
    
adamps’s picture

Status: Needs review » Fixed

Thanks. I'm still using PHP 8.1 so unfortunately I don't see any warning for these cases. I'll change one of the automatic tests to use PHP 8.2.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.