Problem/Motivation

\Drupal\symfony_mailer\Email::customize() does not return $this as it is supposed to do according to \Drupal\symfony_mailer\InternalEmailInterface.

Interface:

  /**
   * Customizes the email.
   *
   * Valid: before rendering.
   *
   * @param string $langcode
   *   The language code.
   * @param \Drupal\Core\Session\AccountInterface $account
   *   The account.
   *
   * @return $this
   */
  public function customize(string $langcode, AccountInterface $account);

Implementation:

  /**
   * {@inheritdoc}
   */
  public function customize(string $langcode, AccountInterface $account) {
    $this->valid(self::PHASE_BUILD);
    $this->langcode = $langcode;
    $this->account = $account;
    $this->phase = self::PHASE_PRE_RENDER;
  }

Steps to reproduce

N/A

Proposed resolution

Make \Drupal\symfony_mailer\Email::customize() return $this.

Remaining tasks

- Create MR
- Review MR
- Merge MR

User interface changes

N/A

API changes

N/A

Data model changes

N/A

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

ricovandevin created an issue. See original summary.

ricovandevin’s picture

Issue summary: View changes
Status: Active » Needs review

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

  • AdamPS committed 8d1d290b on 1.x authored by ricovandevin
    Issue #3355373 by ricovandevin: The customize() method misses a return...
adamps’s picture

Status: Needs review » Fixed

Great thanks

Status: Fixed » Closed (fixed)

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