Task #102164


Epic #101608: File Abstraction Layer Changes for v13

Have the task object clean up the configuration

Added by Benni Mack 7 months ago. Updated 4 months ago.

Should have
File Abstraction Layer (FAL)
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Sprint Focus:


Within the FileProcessingService class, various cleanups regarding the configuration array was made in order to avoid duplicate processed files.

However, as noted in the existing code, this actually are special cases for specific tasks (ensuring that width and height are actually integers and have max boundaries in ImagePreviewTask).

However, there is a culprit when moving this to the actual Task Objects (and that might be the reason why it was implemented the way it was):

First, there is the ProcessedFile object, which then has a ->getTask() call, which then builds the Task object. The Task object thus needs a ProcessedFile object.

But the ProcessedFile object is created AFTER it was checked in the DB based on the given configuration (which needs to be sanitized first to avoid duplicates),
so a classic Chicken Egg problem.

In the ideal world, the Task object should not hold state anymore, but write everything back to the ProcessedFile (e.g. configuration) as this is still duplicated in the current state.

So, to reduce the interwoven situation, the AbstractTask object now has a new option called sanitizeConfiguration() which at a later point should be part of the interface (= breaking), but then also work with the ProcessedFile->getProcessingConfiguration()
directly to reduce the duplication of memory everywhere.

For the time being, an intermediate (empty) ProcessedFile
is created, a Task object is instantiated and the configuration
is sanitized (in the ProcessedFileRepository),
when checking in the DB if a DB entry is available.

The final ProcessedFile object is re-created after the DB
query, which contains the sanitized configuration array.

Actions #1

Updated by Gerrit Code Review 7 months ago

  • Status changed from New to Under Review

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at

Actions #2

Updated by Benni Mack 7 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #3

Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF