1 2.. include:: ../../Includes.txt 3 4============================================================ 5Deprecation: #55419 - Streamline file conflict mode handling 6============================================================ 7 8See :issue:`55419` 9 10 11Description 12=========== 13 14Conflicts in file names and folder names when uploading new files or creating new folders are now handled 15uniformly with constants within the core. Therefore a new enumeration has been introduced to provide the available 16values: `\TYPO3\CMS\Core\Resource\DuplicationBehavior`. 17 18Provided constants are: 19 20* `DuplicationBehavior::CANCEL` 21* `DuplicationBehavior::REPLACE` 22* `DuplicationBehavior::RENAME` 23 24Before this change there were two sets of strings used to define the behavior upon conflicts. 25 26* Set1: `cancel`, `replace` and `changeName` 27* Set2: `cancel`, `overrideExistingFile` and `renameNewFile` 28 29As they are redundant they are now represented by a new set of constants: 30 31* `CANCEL`, `REPLACE` and `RENAME` 32 33All usages of strings of the former sets have been replaced with their counterparts from the new set. In the enumeration 34the former values have been mapped to the new values and marked for deprecation. 35 36 37Impact 38====== 39 40Using `changeName`, `overrideExistingFile` or `renameNewFile` for file conflict handling will result in a deprecation log entry. 41 42 43Affected Installations 44====================== 45 46All third party code that calls one of the listed methods with `$conflictMode` either set to `changeName`, `overrideExistingFile` or `renameNewFile`. 47 48 49Migration 50========= 51 52Use the provided enumeration `\TYPO3\CMS\Core\Resource\DuplicationBehavior` instead. 53 54 55Example 56======= 57 58.. code-block:: php 59 60 $resourceStorage->copyFile($file, $targetFolder, 'target-file-name', DuplicationBehavior::RENAME); 61 62 63.. index:: FAL, PHP-API, Backend 64