Deprecation: #86406 - TCA type group internal_type file and file_reference

See Issue #86406

Description

The TCA property values internal_type="file" and internal_type="file_reference" for columns config type="group" have been marked as deprecated.

A series of related methods have been marked as deprecated:

  • TYPO3\CMS\Core\DataHandling\DataHandler->checkValue_group_select_file()
  • TYPO3\CMS\Core\DataHandling\DataHandler->copyRecord_procFilesRefs()
  • TYPO3\CMS\Core\DataHandling\DataHandler->extFileFields()
  • TYPO3\CMS\Core\DataHandling\DataHandler->extFileFunctions()
  • TYPO3\CMS\Core\Database\ReferenceIndex->getRelations_procFiles()
  • TYPO3\CMS\Core\Integrity\DatabaseIntegrityCheck->getFileFields()

Some constants have bee marked as deprecated:

  • TYPO3\CMS\Core\DataHandling\TableColumnSubType::FILE
  • TYPO3\CMS\Core\DataHandling\TableColumnSubType::FILE_REFERENCE

The “internal_type” functionality has been superseded by the File Abstraction Layer (FAL) since TYPO3 6.0 and has several drawbacks within TYPO3 (e.g. multiple copies of files based on a file name, no flexibility for moving data to a different storage, no metadata functionality, no cropping functionality).

Impact

The Backend module “Upgrade” > “Check TCA migrations” shows them as deprecated, and triggers a E_USER_DEPRECATED error.

Using the TCA property values mentioned above will trigger a PHP E_USER_DEPRECATED error when the cache is cleared.

Affected Installations

Installations still using the methods or constants, or TYPO3 installations with extensions registering custom TCA fields with the mentioned TCA properties.

Migration

It is rather unlikely instances use one of the above methods or constants. The extension scanner will find possible usages, though.

It’s more likely that extensions use type=group with internal_type=file or internal_type=file_reference . Those should switch to use FAL references based on type=inline instead.

The core code changed one last internal_type=file usage in TYPO3 v9 and moved it to FAL. Several use-cases within the last TYPO3 major versions show how to migrate a legacy file field to FAL (e.g. “fe_users.image” or “tt_content.image” including automatic upgrade wizards for the database - an example of the last migration can be found online . These previous changes give some insight on how a file relation could be changed to FAL and comes with an upgrade wizard that can be a helpful example if existing extension data needs to be migrated.