PHP Fatal error: Type of Drupal\amazon_ses\Plugin\Mail\AmazonSes::$configFactory must not be defined

Created on 12 February 2025, 11 days ago

Problem/Motivation

Receive the following error when the site attempts to send an email (in this context, via a handler after a webform submission):

NOTICE: PHP message: PHP Fatal error: Type of Drupal\amazon_ses\Plugin\Mail\AmazonSes::$configFactory must not be defined (as in class Drupal\Core\Mail\Plugin\Mail\PhpMail) in /var/www/html/web/modules/contrib/amazon_ses/src/Plugin/Mail/AmazonSes.php on line 23

This error was pointed out here by code quality: https://git.drupalcode.org/project/amazon_ses/-/merge_requests/20/diffs#...

And also detected as a warning during a phpstan run here: https://git.drupalcode.org/project/amazon_ses/-/jobs/2363149

Steps to reproduce

Install and configure version 3.1.0 of the module.

Proposed resolution

I threw together a local patch for the issue, will open an MR as time permits.

Remaining tasks

Review patch and MR.

πŸ› Bug report
Status

Active

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States fholub13

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024