[TASK] Refactor FAL file processing
authorAndreas Wolf <andreas.wolf@typo3.org>
Fri, 19 Oct 2012 15:20:12 +0000 (17:20 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Tue, 20 Nov 2012 22:08:56 +0000 (23:08 +0100)
commit66c204f0bf3e83d302e6a5f9e367ebda267a015e
tree9e040b3b4327f37f50bc19d6026b3dafecb0ab6b
parentd8dfa6afd159b30b5e967ac91e35b13a1d94d13d
[TASK] Refactor FAL file processing

File processing is a central part of TYPO3's file usage, as e.g. all
images in content elements have to be resized when they don't fit the
requirements. However, the current implementation of file processing
with FAL has several drawbacks and shortcomings, not to mention quite a
few bugs.

This patch brings a completely reworked infrastructure behind the
File Processing Service, while keeping the external API unchanged.

The processing to be done is described in tasks, which are part of a
ProcessedFile's properties. The processing itself is now moved to
processors, which could execute the tasks using different utilities,
e.g. ImageMagick or some cloud image processing service. Currently,
there is only a local image processor implementation, which relies on
ImageMagick/GraphicsMagick (i.e. uses the same configuration as the old
processing).

The processed file class now also supports safe handling of unchanged
files, i.e. files that should have been processed, but didn't need
processing.

Fixes: #43059
Fixes: #39904
Fixes: #40033
Fixes: #40669
Releases: 6.0

Change-Id: I186a46f9923dacd98be655d72be2bd89b43866c2
Reviewed-on: http://review.typo3.org/14310
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
24 files changed:
t3lib/stddb/DefaultConfiguration.php
t3lib/stddb/tables.sql
typo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php
typo3/sysext/core/Classes/Resource/File.php
typo3/sysext/core/Classes/Resource/ProcessedFile.php
typo3/sysext/core/Classes/Resource/ProcessedFileRepository.php
typo3/sysext/core/Classes/Resource/Processing/AbstractGraphicalTask.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/Processing/AbstractTask.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/Processing/ImageCropScaleMaskTask.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/Processing/ImagePreviewTask.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/Processing/LocalCropScaleMaskHelper.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/Processing/LocalImageProcessor.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/Processing/LocalPreviewHelper.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/Processing/ProcessorInterface.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/Processing/TaskInterface.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/Processing/TaskTypeRegistry.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/ResourceFactory.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Resource/Service/FileProcessingService.php
typo3/sysext/core/Classes/Resource/Service/ImageProcessingService.php
typo3/sysext/core/Tests/Unit/Resource/ProcessedFileRepositoryTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Resource/ResourceStorageTest.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/tce_file.php