PHP fatal error when trying to install the module

Created on 2 June 2025, 3 months ago

Problem/Motivation

After a fresh composer require 'drupal/symfony_mailer:^2.0@alpha', either via drush or UI, try to enable the module (will enable both symfony_mailer and mailer_transport as one requires the other), and will cause the following error:

Fatal error: Trait "Drupal\symfony_mailer\AutowireTrait" not found in /var/www/html/web/modules/contrib/symfony_mailer/modules/mailer_transport/src/Plugin/TransportUI/DsnTransportUI.php on line 22

Steps to reproduce

- Fresh install
- drush en mailer_transport / drush en symfony_mailer
- Also valid via UI

Proposed resolution

Remaining tasks

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇧🇪Belgium gorkagr

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