Bug #88806

"Test Mail Setup" broken: Too few arguments to function EventDispatcher::__construct()

Added by Mathias Brodala about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Must have
Category:
System/Bootstrap/Configuration
Target version:
-
Start date:
2019-07-19
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Using Test Mail Setup in the Environment module currently fails with an error which can be found in the TYPO3 logfile:

Fri, 19 Jul 2019 16:25:30 +0200 [CRITICAL] request="262570147be62" component="TYPO3.CMS.Core.Error.DebugExceptionHandler": Core: Exception handler (WEB): Uncaught TYPO3 Exception: Too few arguments to function TYPO3\CMS\Core\EventDispatcher\EventDispatcher::__construct(), 0 passed in /.../typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 3450 and exactly 1 expected | ArgumentCountError thrown in file /.../typo3/sysext/core/Classes/EventDispatcher/EventDispatcher.php in line 35. Requested URL: http://.../typo3/install.php?install[controller]=environment&install[context]=backend - {"TYPO3_MODE":"BE","exception":{}}

For some reason dependency injection does not seem to be working properly here.

Associated revisions

Revision 80588bc2 (diff)
Added by Benjamin Franzke about 1 month ago

[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 <>
Tested-by: Mathias Brodala <>
Tested-by: Andreas Fernandez <>
Reviewed-by: Mathias Brodala <>
Reviewed-by: Andreas Fernandez <>

History

#1 Updated by Benjamin Franzke about 1 month ago

  • Assignee set to Benjamin Franzke

#2 Updated by Gerrit Code Review about 1 month ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61329

#3 Updated by Gerrit Code Review about 1 month ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61329

#4 Updated by Gerrit Code Review about 1 month ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61329

#5 Updated by Benjamin Franzke about 1 month ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF