[!!!][TASK] Remove deprecated code from TableController
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / 9.5 / Deprecation-86406-TCATypeGroupInternal_typeFileAndFile_reference.rst
1 .. include:: ../../Includes.txt
2
3 ==========================================================================
4 Deprecation: #86406 - TCA type group internal_type file and file_reference
5 ==========================================================================
6
7 See :issue:`86406`
8
9 Description
10 ===========
11
12 The :php:`TCA` property values :php:`internal_type="file"` and :php:`internal_type="file_reference"`
13 for columns config :php:`type="group"` have been marked as deprecated.
14
15 A series of related methods have been marked as deprecated:
16
17 * :php:`TYPO3\CMS\Core\DataHandling\DataHandler->checkValue_group_select_file()`
18 * :php:`TYPO3\CMS\Core\DataHandling\DataHandler->copyRecord_procFilesRefs()`
19 * :php:`TYPO3\CMS\Core\DataHandling\DataHandler->extFileFields()`
20 * :php:`TYPO3\CMS\Core\DataHandling\DataHandler->extFileFunctions()`
21 * :php:`TYPO3\CMS\Core\Database\ReferenceIndex->getRelations_procFiles()`
22 * :php:`TYPO3\CMS\Core\Integrity\DatabaseIntegrityCheck->getFileFields()`
23
24 Some constants have bee marked as deprecated:
25
26 * :php:`TYPO3\CMS\Core\DataHandling\TableColumnSubType::FILE`
27 * :php:`TYPO3\CMS\Core\DataHandling\TableColumnSubType::FILE_REFERENCE`
28
29 The "internal_type" functionality has been superseded by the File Abstraction Layer (FAL) since TYPO3 6.0
30 and has several drawbacks within TYPO3 (e.g. multiple copies of files based on a file name, no flexibility
31 for moving data to a different storage, no metadata functionality, no cropping functionality).
32
33 Impact
34 ======
35
36 The Backend module "Upgrade" > "Check TCA migrations" shows them as deprecated, and triggers a
37 :php:`E_USER_DEPRECATED` error.
38
39 Using the TCA property values mentioned above will trigger a PHP :php:`E_USER_DEPRECATED` error when the cache is cleared.
40
41
42 Affected Installations
43 ======================
44
45 Installations still using the methods or constants, or TYPO3 installations with extensions registering custom
46 TCA fields with the mentioned TCA properties.
47
48 Migration
49 =========
50
51 It is rather unlikely instances use one of the above methods or constants. The extension scanner will find possible
52 usages, though.
53
54 It's more likely that extensions use :php:`type=group` with :php:`internal_type=file` or
55 :php:`internal_type=file_reference`. Those should switch to use FAL references based on
56 :php:`type=inline` instead.
57
58 The core code changed one last :php:`internal_type=file` usage in TYPO3 v9 and moved it to FAL. Several use-cases
59 within the last TYPO3 major versions show how to migrate a legacy file field to FAL (e.g. "fe_users.image"
60 or "tt_content.image" including automatic upgrade wizards for the database - an example of the last migration can be
61 found online_. These previous changes give some insight on how a file relation could be changed to FAL and comes
62 with an upgrade wizard that can be a helpful example if existing extension data needs to be migrated.
63
64 .. _online: https://review.typo3.org/#/c/54830/
65
66 .. index:: Backend, PHP-API, TCA, PartiallyScanned