[BUGFIX] Use DriverInterface instead AbstractDriver for method signature 14/53714/3
authorFranz Koch <typo3@elements-net.de>
Sat, 12 Aug 2017 08:14:28 +0000 (10:14 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Fri, 18 Aug 2017 05:55:21 +0000 (07:55 +0200)
FAL drivers are not obligated to extend the AbstractDriver but only
to implement the DriverInterface. Having custom drivers that are not
based on AbstractDriver (because they are f.e. non hierarchical)
currently causes an Exception because PreviewProcessing expects an
instance of AbstractDriver as method argument.

This patch changes te signature from AbstractDriver to DriverInterface.

Resolves: #82114
Releases: master, 8.7, 7.6
Change-Id: Ia27c6c1c7510ecfe5afd0f7d8bedf81bf3d31c84
Reviewed-on: https://review.typo3.org/53714
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>

index 3e760e2..faecdb5 100644 (file)
@@ -15,7 +15,7 @@ namespace TYPO3\CMS\Core\Resource\OnlineMedia\Processing;
 use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
-use TYPO3\CMS\Core\Resource\Driver\AbstractDriver;
+use TYPO3\CMS\Core\Resource\Driver\DriverInterface;
 use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\OnlineMediaHelperRegistry;
 use TYPO3\CMS\Core\Resource\ProcessedFile;
@@ -52,13 +52,13 @@ class PreviewProcessing
      * Create static image preview for Online Media item when possible
      * @param FileProcessingService $fileProcessingService
-     * @param AbstractDriver $driver
+     * @param DriverInterface $driver
      * @param ProcessedFile $processedFile
      * @param File $file
      * @param string $taskType
      * @param array $configuration
-    public function processFile(FileProcessingService $fileProcessingService, AbstractDriver $driver, ProcessedFile $processedFile, File $file, $taskType, array $configuration)
+    public function processFile(FileProcessingService $fileProcessingService, DriverInterface $driver, ProcessedFile $processedFile, File $file, $taskType, array $configuration)
         if ($taskType !== ProcessedFile::CONTEXT_IMAGEPREVIEW && $taskType !== ProcessedFile::CONTEXT_IMAGECROPSCALEMASK) {