Skip to content

Commit

Permalink
Merge pull request #52 from pluswerk/bugfix/install-tool-test-mail
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanti authored Nov 10, 2023
2 parents 992806e + 6e33cbb commit 7f66542
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
9 changes: 9 additions & 0 deletions Classes/Logging/LoggingTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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';
}
}
}
11 changes: 0 additions & 11 deletions Configuration/.htaccess

This file was deleted.

12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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
},
Expand Down

0 comments on commit 7f66542

Please sign in to comment.