Project

General

Profile

Actions

Task #102335

open

TransportFactory should instantiate custom transports via DI container

Added by Alexander Schnitzler 7 months ago.

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...

No data to display

Actions

Also available in: Atom PDF