[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:TYPO3com <noreply@typo3.com> Tested-by:
Mathias Brodala <mbrodala@pagemachine.de> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Mathias Brodala <mbrodala@pagemachine.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
Please register or sign in to comment