[TASK] Use proper File objects in FileProcessingService
FileProcessingService and its surrounding code within File / FileReference / ResourceStorage and ProcessedFileRepository was hinted to use "FileInterface" which is technically wrong, and - if used - throws a PHP 8 warning because the ProcessedFileRepository checks for the "uid" which is not present in a FileInterface (only for FileReferences, File and ProcessedFile objects). Since it is technically not possible to process a processed file due to the DB relations, this code is now using the correct type hints to avoid PHP errors. In addition, the FileProcessingService is now made DI-aware, so it can injected all necessary services. As this is part of a series to clean up types within FAL in v13, the PHP method signature changes will be documented in a separate commit. Resolves: #101943 Related: #101945 Releases: main Change-Id: I2727cbe12d9f9b507428088ae2c4075af5e90670 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81075 Tested-by:Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- Build/phpstan/phpstan-baseline.neon 1 addition, 1 deletionBuild/phpstan/phpstan-baseline.neon
- typo3/sysext/core/Classes/Resource/File.php 1 addition, 2 deletionstypo3/sysext/core/Classes/Resource/File.php
- typo3/sysext/core/Classes/Resource/Processing/ProcessorRegistry.php 6 additions, 14 deletions...xt/core/Classes/Resource/Processing/ProcessorRegistry.php
- typo3/sysext/core/Classes/Resource/ResourceStorage.php 3 additions, 11 deletionstypo3/sysext/core/Classes/Resource/ResourceStorage.php
- typo3/sysext/core/Classes/Resource/Service/FileProcessingService.php 44 additions, 75 deletions...t/core/Classes/Resource/Service/FileProcessingService.php
- typo3/sysext/core/Configuration/Services.yaml 3 additions, 0 deletionstypo3/sysext/core/Configuration/Services.yaml
- typo3/sysext/core/Tests/Unit/Resource/Processing/ProcessorRegistryTest.php 10 additions, 3 deletions.../Tests/Unit/Resource/Processing/ProcessorRegistryTest.php
Please register or sign in to comment