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), 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
Move AutowireTrait into mailer_transport module.
Remaining tasks
Issue fork symfony_mailer-3527939
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
gorkagr commentedComment #3
adamps commentedThanks. The problem is that mailer_tranport is using that class from symfony_mailer without declaring a dependency and also symfony_mailer depends on mailer_tranport.
This affects fresh installs only - I have various sites running with the current release. So 2 potential workarounds:
use AutowireTrait;- then put back after installingComment #5
adamps commentedIt's strange that the tests still worked.
Comment #7
adamps commented