It would be more convenient to have same constructor as Mailer.
This extension overrides Mailer (via Xclass) but has different constructor. This way, it is not easily possible to instantiate it via DI.
TYPO3 Mailer:
public function __construct(
protected ?TransportInterface $transport = null,
protected readonly ?EventDispatcherInterface $eventDispatcher = null,
)
mail_logger: MailerExtender:
public function __construct(
protected LoggingTransportFactory $loggingTransportFactory,
?TransportInterface $transport = null,
?EventDispatcherInterface $eventDispatcher = null,
) {
Or for example, if you instantiate Mailer like this:
$mailer = GeneralUtility::makeInstance(Mailer::class);
you get exception because of not passed argument $loggingTransportFactory. I use Mailer in several extensions and had to add checks for mail_logger.
It would be more convenient to have same constructor as Mailer.
This extension overrides Mailer (via Xclass) but has different constructor. This way, it is not easily possible to instantiate it via DI.
TYPO3 Mailer:
mail_logger: MailerExtender:
Or for example, if you instantiate Mailer like this:
$mailer = GeneralUtility::makeInstance(Mailer::class);
you get exception because of not passed argument $loggingTransportFactory. I use Mailer in several extensions and had to add checks for mail_logger.