[BUGFIX] Use DriverInterface instead AbstractDriver for method signature 84/53684/6
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 07:54:57 +0000 (09:54 +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/53684
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/core/Classes/Resource/OnlineMedia/Processing/PreviewProcessing.php

index 293aba8..6cf17f3 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 !== 'Image.Preview' && $taskType !== 'Image.CropScaleMask') {
             return;