Deprecation: #55419 - Streamline file conflict mode handling
See forge#55419
Description
Conflicts in file names and folder names when uploading new files or creating new folders are now handled
uniformly with constants within the core. Therefore a new enumeration has been introduced to provide the available
values: \TYPO3\.
Provided constants are:
DuplicationBehavior:: CANCEL DuplicationBehavior:: REPLACE DuplicationBehavior:: RENAME
Before this change there were two sets of strings used to define the behavior upon conflicts.
- Set1:
cancel,replaceandchangeName - Set2:
cancel,overrideandExisting File renameNew File
As they are redundant they are now represented by a new set of constants:
CANCEL,REPLACEandRENAME
All usages of strings of the former sets have been replaced with their counterparts from the new set. In the enumeration the former values have been mapped to the new values and marked for deprecation.
Impact
Using change, override or rename for file conflict handling will result in a deprecation log entry.
Affected Installations
All third party code that calls one of the listed methods with $conflict either set to change, override or rename.
Migration
Use the provided enumeration \TYPO3\ instead.
Example
$resourceStorage->copyFile($file, $targetFolder, 'target-file-name', DuplicationBehavior::RENAME);