From 1affaae6760ac91b0e466c8ad07aa938caeb0b42 Mon Sep 17 00:00:00 2001 From: Daniel Hoffmann Date: Mon, 26 Aug 2024 14:33:18 +0200 Subject: [PATCH 1/5] [BUGFIX] LogLevel is evaluated correctly Resolves: https://projekte.in2code.de/issues/64747 --- Classes/Utility/LogUtility.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Utility/LogUtility.php b/Classes/Utility/LogUtility.php index 5e1f0afa3..dc5e56ae9 100644 --- a/Classes/Utility/LogUtility.php +++ b/Classes/Utility/LogUtility.php @@ -27,14 +27,14 @@ * This copyright notice MUST APPEAR in all copies of the script! */ -use Psr\Log\LogLevel; +use TYPO3\CMS\Core\Log\LogLevel; use TYPO3\CMS\Core\Messaging\AbstractMessage; class LogUtility { public static function translateLogLevelToSeverity(int $logLevel): int { - switch ($logLevel) { + switch (LogLevel::getInternalName($logLevel)) { case LogLevel::DEBUG: $severity = AbstractMessage::NOTICE; break; From 177d14015125fe22601741d1a475b5b1a9ea4d04 Mon Sep 17 00:00:00 2001 From: Daniel Hoffmann Date: Wed, 25 Sep 2024 09:54:37 +0200 Subject: [PATCH 2/5] Revert "[BUGFIX] Enable Logging in Command on foreign" This reverts commit bd5298f12dbdb0a81a7d62cf3a330474ec454917. --- .../Command/Foreign/RunTasksInQueueCommand.php | 11 ++--------- .../PostPublishTaskExecution/ForeignServices.php | 3 +-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php b/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php index 520bc03b3..c7dffdbf3 100644 --- a/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php +++ b/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php @@ -32,7 +32,7 @@ use In2code\In2publishCore\Component\PostPublishTaskExecution\Domain\Model\Task\AbstractTask; use In2code\In2publishCore\Component\PostPublishTaskExecution\Domain\Repository\TaskRepositoryInjection; use In2code\In2publishCore\Service\Context\ContextServiceInjection; -use Psr\Log\LoggerInterface; +use Psr\Log\LoggerAwareTrait; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -50,17 +50,10 @@ class RunTasksInQueueCommand extends Command { use ContextServiceInjection; use TaskRepositoryInjection; + use LoggerAwareTrait; public const IDENTIFIER = 'in2publish_core:publishtasksrunner:runtasksinqueue'; - protected ?LoggerInterface $logger = null; - - public function __construct(LoggerInterface $logger) - { - $this->logger = $logger; - parent::__construct(); - } - public function isEnabled(): bool { return $this->contextService->isForeign(); diff --git a/Configuration/Component/PostPublishTaskExecution/ForeignServices.php b/Configuration/Component/PostPublishTaskExecution/ForeignServices.php index e9eaca3b6..cdca0a5b7 100644 --- a/Configuration/Component/PostPublishTaskExecution/ForeignServices.php +++ b/Configuration/Component/PostPublishTaskExecution/ForeignServices.php @@ -25,6 +25,5 @@ 'hidden' => true, 'schedulable' => false, ], - ) - ->public(); + ); }; From 31379c3a720da2c3a98230f3dcc8472b2d0ff6d3 Mon Sep 17 00:00:00 2001 From: Daniel Hoffmann Date: Wed, 25 Sep 2024 09:55:57 +0200 Subject: [PATCH 3/5] [BUGFIX] Enable Logging in Command on foreign Resolves: https://projekte.in2code.de/issues/65670 --- .../Command/Foreign/RunTasksInQueueCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php b/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php index c7dffdbf3..4993da91e 100644 --- a/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php +++ b/Classes/Component/PostPublishTaskExecution/Command/Foreign/RunTasksInQueueCommand.php @@ -32,6 +32,7 @@ use In2code\In2publishCore\Component\PostPublishTaskExecution\Domain\Model\Task\AbstractTask; use In2code\In2publishCore\Component\PostPublishTaskExecution\Domain\Repository\TaskRepositoryInjection; use In2code\In2publishCore\Service\Context\ContextServiceInjection; +use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -46,7 +47,7 @@ use const JSON_THROW_ON_ERROR; -class RunTasksInQueueCommand extends Command +class RunTasksInQueueCommand extends Command implements LoggerAwareInterface { use ContextServiceInjection; use TaskRepositoryInjection; From f2ebf77ec95dbbf4cfc01e7ef84ae596195316cc Mon Sep 17 00:00:00 2001 From: Daniel Hoffmann Date: Wed, 25 Sep 2024 10:06:48 +0200 Subject: [PATCH 4/5] [META] Set the EM conf version number to 12.5.4 --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index 1e8acc85f..7721d7af1 100755 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -9,7 +9,7 @@ 'title' => 'in2publish Core', 'description' => 'Content publishing extension to connect stage and production server', 'category' => 'plugin', - 'version' => '12.5.3', + 'version' => '12.5.4', 'state' => 'stable', 'clearCacheOnLoad' => true, 'author' => 'Alex Kellner, Oliver Eglseder, Thomas Scheibitz, Stefan Busemann', From c9f809dc49d57fb7300cfbf5dbb8099e74dd193a Mon Sep 17 00:00:00 2001 From: Daniel Hoffmann Date: Wed, 25 Sep 2024 10:08:20 +0200 Subject: [PATCH 5/5] [DOCS] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aeb7c0c61..ee47c0fb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # In2publish Core Change Log +15.5.4: +- [BUGFIX] Enable Logging in Command on foreign +- [BUGFIX] LogLevel is evaluated correctly + 12.5.3: - [CODESTYLE] Make qa happy