diff --git a/CHANGELOG.md b/CHANGELOG.md index 6666ff8..99e8139 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 1.5.4 +* **[FIX]** Add compatibility condition for compression command to avoid event not found exception for TYPO3 version lower 10 + ### 1.5.3 * **[FIX]** Add correct return type to compress command * **[FIX]** Remove deprecated replace and add extension key in composer json diff --git a/Classes/Command/CompressImagesCommand.php b/Classes/Command/CompressImagesCommand.php index cfb83e5..6bc1498 100644 --- a/Classes/Command/CompressImagesCommand.php +++ b/Classes/Command/CompressImagesCommand.php @@ -120,9 +120,13 @@ protected function compressImages(QueryResultInterface $files): void if ($file instanceof \Schmitzal\Tinyimg\Domain\Model\File) { $file = $this->resourceFactory->getFileObject($file->getUid()); $this->compressImageService->initializeCompression($file); - $fileDeletionAspect->cleanupProcessedFilesPostFileReplace( - new AfterFileReplacedEvent($file, '') - ); + if (version_compare(TYPO3_version, '10', '<')) { + $fileDeletionAspect->cleanupProcessedFilesPostFileReplace($file, ''); + } else { + $fileDeletionAspect->cleanupProcessedFilesPostFileReplace( + new AfterFileReplacedEvent($file, '') + ); + } } } } diff --git a/ext_emconf.php b/ext_emconf.php index f3af117..7ae2d22 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -6,7 +6,7 @@ 'author' => 'Alessandro Schmitz', 'author_email' => 'alessandro.schmitz@interlutions.de', 'author_company' => 'Interlutions GmbH', - 'version' => '1.5.3', + 'version' => '1.5.4', 'state' => 'beta', 'clearCacheOnLoad' => true, 'constraints' => [