Skip to content

Commit

Permalink
Merge pull request #68 from schmitzal/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
schmitzal authored Jun 23, 2021
2 parents 594516b + e2745bd commit 1d9bdbf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 7 additions & 3 deletions Classes/Command/CompressImagesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, '')
);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'author' => 'Alessandro Schmitz',
'author_email' => '[email protected]',
'author_company' => 'Interlutions GmbH',
'version' => '1.5.3',
'version' => '1.5.4',
'state' => 'beta',
'clearCacheOnLoad' => true,
'constraints' => [
Expand Down

0 comments on commit 1d9bdbf

Please sign in to comment.