---
title: "Breaking: #107397 - Circular dependency between ProcessedFile and Task removed"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:breaking-107397-1756543200"
source: "Changelog/14.0/Breaking-107397-CircularDependencyBetweenProcessedFileAndTaskRemoved.rst"
typo3-version: "14.0"
typo3-major: 14
type: "breaking"
issue: 107397
forge: "https://forge.typo3.org/issues/107397"
tags: ["PHP-API", "PartiallyScanned"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Breaking: #107397 - Circular dependency between ProcessedFile and Task removed {#breaking-107397-1756543200}

See [forge#107397](https://forge.typo3.org/issues/107397)

## Description {#description}

The circular dependency between
`\TYPO3\CMS\Core\Resource\ProcessedFile` and File Processing Task
classes has been resolved to improve the architecture and maintainability of
the File Abstraction Layer (FAL) processing system.

The following changes have been made to
`ProcessedFile`:

-   The public method `getTask()` has been removed.
-   The public method `generateProcessedFileNameWithoutExtension()` has been
    removed.

The following changes have been made to
`ProcessedFileRepository`:

-   Method `add()` now requires a `TaskInterface` parameter.
-   Method `update()` now requires a `TaskInterface` parameter.

Additionally, the checksum validation logic has been moved from
`ProcessedFile` to
`AbstractTask`.

## Impact {#impact}

Any code that calls the following methods will cause PHP fatal errors:

-   `ProcessedFile->getTask()`
-   `ProcessedFile->generateProcessedFileNameWithoutExtension()`

Any code that calls `ProcessedFileRepository->add()` or
`ProcessedFileRepository->update()` without the new
`TaskInterface` parameter will cause PHP fatal errors.

Code that relied on `TYPO3CMSCoreResourceProcessedFile` objects
having Task objects available internally will no longer work, as Task objects
are now created externally by
`FileProcessingService` when
needed.

## Affected installations {#affected-installations}

Installations with custom file processing extensions or custom Task
implementations that directly interact with the
`ProcessedFile->getTask()` method are affected. The extension scanner will
report any usage of `ProcessedFile->getTask()` and
`ProcessedFile->generateProcessedFileNameWithoutExtension()` as weak
matches.

Extensions that manually call `ProcessedFileRepository->add()` or
`ProcessedFileRepository->update()` are also affected. The extension
scanner will not report usages of these methods due to too many weak matches.

## Migration {#migration}

Replace calls to `ProcessedFile->getTask()` with direct creation of Task
objects through the `TaskTypeRegistry`:

**Before:**

```php
$task = $processedFile->getTask();
```

**After:**

```php
use TYPO3\CMS\Core\Resource\Processing\TaskTypeRegistry;
use TYPO3\CMS\Core\Utility\GeneralUtility;

$taskTypeRegistry = GeneralUtility::makeInstance(TaskTypeRegistry::class);
$task = $taskTypeRegistry->getTaskForType(
    $processedFile->getTaskIdentifier(),
    $processedFile,
    $processedFile->getProcessingConfiguration()
);
```

It is recommended to implement your own alternative to
`ProcessedFile->generateProcessedFileNameWithoutExtension()` if similar
logic is still needed.

Update calls to `ProcessedFileRepository->add()` and
`ProcessedFileRepository->update()` to include the new
`TaskInterface` parameter:

**Updated calls to ProcessedFileRepository**

```php
use TYPO3\CMS\Core\Resource\Processing\TaskTypeRegistry;
use TYPO3\CMS\Core\Resource\ProcessedFileRepository;
use TYPO3\CMS\Core\Utility\GeneralUtility;

// Before
$processedFileRepository->add($processedFile);
$processedFileRepository->update($processedFile);

// After
$taskTypeRegistry = GeneralUtility::makeInstance(TaskTypeRegistry::class);
$task = $taskTypeRegistry->getTaskForType(
    $processedFile->getTaskIdentifier(),
    $processedFile,
    $processedFile->getProcessingConfiguration()
);

$processedFileRepository = GeneralUtility::makeInstance(ProcessedFileRepository::class);
$processedFileRepository->add($processedFile, $task);
$processedFileRepository->update($processedFile, $task);
```
