Feature: #78036 - Synchronize folder relations after rename

See forge#78036


TYPO3 features the File module where editors and integrators can manage all their media assets in a structured way. Certainly, one essential task is to rename folders from time to time. Since folders are sometimes referenced in other records, e.g. file collections or file mounts, these relations did previously break after a folder was renamed, because the reference index does not contain these relations.

Therefore, TYPO3 does now automatically synchronize all references of a folder when it is renamed. This is done by registering event listeners for the AfterFolderRenamedEvent event. This event is dispatched as soon as a folder was successfully renamed.

To be able to automatically replace the old folder name with the new one, the mentioned event is extended for another property $sourceFolder. This property can be retrieved using the public getSourceFolder() method.

Note that the synchronization is always performed, as soon as a folder was renamed. This does not only apply to the File module, but for every ResourceFactory->renameFolder() call, since the event is being dispatched in this method.


All sys_filemounts and sys_file_collection records which reference a renamed folder are now automatically synchronized.

The AfterFolderRenamedEvent event now features a new property $sourceFolder. Extension authors can use this event to add further synchronization for their custom records.