Actions
Task #102335
openTransportFactory should instantiate custom transports via DI container
Status:
New
Priority:
Should have
Assignee:
-
Category:
Mailer API
Target version:
Start date:
2023-11-07
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
Currently, when using $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] = '<classname>';
and/or $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_spool_type'] = '<classname>';
, the class in question is instantiated via makeInstance()
along with constructor arguments, which does not allow to use a configured service here which itself allows for DI. this also blocks extending AbstractTransport
which does a lot of useful logic already you don't want to reimplement.
The core should use a signaling interface here like MailSettingsAware
which passes the mail settings to the service (if needed) instead of passing those along as constructor arguments, especially since those are available through $GLOBALS
anyway...
Updated by Benni Mack about 1 month ago
- Target version changed from 13 LTS to Candidate for Major Version
Actions