From 6e33cbb44b2c28433e441cbc9a1feeba4641def6 Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Fri, 10 Nov 2023 11:53:11 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20install=20tool=20test=20ma?= =?UTF-8?q?il?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Classes/Logging/LoggingTransport.php | 9 +++++++++ Configuration/.htaccess | 11 ----------- composer.json | 12 ++++++------ 3 files changed, 15 insertions(+), 17 deletions(-) delete mode 100644 Configuration/.htaccess diff --git a/Classes/Logging/LoggingTransport.php b/Classes/Logging/LoggingTransport.php index 8b72707..6beb82f 100644 --- a/Classes/Logging/LoggingTransport.php +++ b/Classes/Logging/LoggingTransport.php @@ -27,6 +27,8 @@ public function __construct(protected TransportInterface $originalTransport) public function send(RawMessage $message, Envelope $envelope = null): ?SentMessage { + $this->fixTcaIfNotPresentIsUsedInInstallTool(); + $mailLogRepository = GeneralUtility::makeInstance(MailLogRepository::class); // write mail to log before send @@ -104,4 +106,11 @@ protected function addressesToString(array $addresses): string ) ); } + + protected function fixTcaIfNotPresentIsUsedInInstallTool(): void + { + if (empty($GLOBALS['TCA']['tx_maillogger_domain_model_maillog'])) { + $GLOBALS['TCA']['tx_maillogger_domain_model_maillog'] = require __DIR__ . '/../../Configuration/TCA/tx_maillogger_domain_model_maillog.php'; + } + } } diff --git a/Configuration/.htaccess b/Configuration/.htaccess deleted file mode 100644 index 3e638f8..0000000 --- a/Configuration/.htaccess +++ /dev/null @@ -1,11 +0,0 @@ -# Apache < 2.3 - - Order allow,deny - Deny from all - Satisfy All - - -# Apache >= 2.3 - - Require all denied - diff --git a/composer.json b/composer.json index 2aa4453..14eab1d 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,10 @@ }, "require-dev": { "ext-json": "*", - "pluswerk/grumphp-config": "^6.8.2", + "pluswerk/grumphp-config": "^6.9.0", "saschaegerer/phpstan-typo3": "^1.9.0", "spatie/phpunit-snapshot-assertions": "^4.2.16", - "ssch/typo3-rector": "^1.3.6", + "ssch/typo3-rector": "^1.4.1", "typo3/testing-framework": "^7.0.4" }, "replace": { @@ -38,12 +38,12 @@ }, "config": { "allow-plugins": { - "typo3/cms-composer-installers": true, - "typo3/class-alias-loader": true, + "ergebnis/composer-normalize": true, "phpro/grumphp": true, - "pluswerk/grumphp-config": true, "phpstan/extension-installer": true, - "ergebnis/composer-normalize": true + "pluswerk/grumphp-config": true, + "typo3/class-alias-loader": true, + "typo3/cms-composer-installers": true }, "sort-packages": true },