[!!!][TASK] Streamline File Processing API
This change the concept of the Processed File API, which was introduced back in TYPO3 v6 in 2012 (commit #66c204f0), and was almost not touched since then. The "TaskInterface" was hardly extended for purposes other than "ImagePreview" (BE) and "ImageCropScaleMask" (FE). In order to accommodate for what is / was useful in the past years, the TaskInterface's interface signature was adapted, next to typed methods and arguments, the method "sanitizeConfiguration" is added, allowing to reduce logic in the "LocalPreviewHelper". The AbstractGraphicalTask was removed as it extended from AbstractTask and had little value over the concrete implementations, and wasn't even abstract. The AbstractTask now has two abstract methods "getName" and "getType" in order to be extended in its subclasses. All in all, the main goal for this patch is to make the structure of this functionality easier to understand: * A task holds the configuration of a file * A ProcessedFile object is the instance of a file that was or is about to be processed file * A processor can be used to do the actual action Resolves: #102165 Releases: main Change-Id: Ica3ffcfc9c2fee5b5344f5e8b968989fd4371eb4 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81618 Reviewed-by:Andreas Kienast <a.fernandez@scripting-base.de> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Andreas Kienast <a.fernandez@scripting-base.de>
Showing
- Build/phpstan/phpstan-baseline.neon 0 additions, 5 deletionsBuild/phpstan/phpstan-baseline.neon
- typo3/sysext/core/Classes/Imaging/ImageDimension.php 3 additions, 4 deletionstypo3/sysext/core/Classes/Imaging/ImageDimension.php
- typo3/sysext/core/Classes/Resource/ProcessedFile.php 34 additions, 93 deletionstypo3/sysext/core/Classes/Resource/ProcessedFile.php
- typo3/sysext/core/Classes/Resource/ProcessedFileRepository.php 1 addition, 4 deletions.../sysext/core/Classes/Resource/ProcessedFileRepository.php
- typo3/sysext/core/Classes/Resource/Processing/AbstractGraphicalTask.php 0 additions, 82 deletions...ore/Classes/Resource/Processing/AbstractGraphicalTask.php
- typo3/sysext/core/Classes/Resource/Processing/AbstractTask.php 38 additions, 111 deletions.../sysext/core/Classes/Resource/Processing/AbstractTask.php
- typo3/sysext/core/Classes/Resource/Processing/ImageCropScaleMaskTask.php 41 additions, 18 deletions...re/Classes/Resource/Processing/ImageCropScaleMaskTask.php
- typo3/sysext/core/Classes/Resource/Processing/ImagePreviewTask.php 43 additions, 35 deletions...ext/core/Classes/Resource/Processing/ImagePreviewTask.php
- typo3/sysext/core/Classes/Resource/Processing/LocalPreviewHelper.php 2 additions, 7 deletions...t/core/Classes/Resource/Processing/LocalPreviewHelper.php
- typo3/sysext/core/Classes/Resource/Processing/TaskInterface.php 15 additions, 39 deletions...sysext/core/Classes/Resource/Processing/TaskInterface.php
- typo3/sysext/core/Classes/Resource/Service/FileProcessingService.php 5 additions, 12 deletions...t/core/Classes/Resource/Service/FileProcessingService.php
- typo3/sysext/core/Documentation/Changelog/13.0/Breaking-102165-FileAbstractionLayerProcessingAPIsAndInterfaceChanged.rst 66 additions, 0 deletions...FileAbstractionLayerProcessingAPIsAndInterfaceChanged.rst
- typo3/sysext/core/Tests/Unit/Resource/ProcessedFileTest.php 2 additions, 10 deletionstypo3/sysext/core/Tests/Unit/Resource/ProcessedFileTest.php
- typo3/sysext/core/Tests/Unit/Resource/Processing/LocalPreviewHelperTest.php 5 additions, 4 deletions...Tests/Unit/Resource/Processing/LocalPreviewHelperTest.php
- typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php 5 additions, 0 deletions...l/Configuration/ExtensionScanner/Php/ClassNameMatcher.php
Please register or sign in to comment