Skip to content
Snippets Groups Projects
Commit 80588bc2 authored by Benjamin Franzke's avatar Benjamin Franzke Committed by Andreas Fernandez
Browse files

[BUGFIX] Ensure EventDispatcher is available in installtool container

The Mailer class used by EnvironmentController::mailTestAction()
requires the EventDispatcher to be available. Provide it by
configuring EventDispatcher and ListenerProvider in a ServiceProvider,
which enables usage from the failsafe install-tool container.

Note: Event listeners that are registered using symfony tags
will still be added to the ServiceProvider instantiated ListenerProvider
in non-failsafe mode. The symfony generated factory will look like:

  $this->services['TYPO3\\CMS\\Core\\EventDispatcher\\ListenerProvider'] =
     $instance =
     \TYPO3\CMS\Core\ServiceProvider::getListenerProvider($this);
  $instance
    ->addListener(
      'TYPO3\\CMS\\Core\\Mail\\Event\\AfterMailerInitializationEvent',
      'TYPO3\\CMS\\Core\\Compatibility\\Slot\\PostInitializeMailer',
      NULL
    );

Resolves: #88806
Releases: master
Change-Id: I4775cc04af3d62ae08c43d762f51af31858cac2d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61329


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarMathias Brodala <mbrodala@pagemachine.de>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarMathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent db282038
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment