Skip to content
Snippets Groups Projects
Commit 053f8755 authored by Nikita Hovratov's avatar Nikita Hovratov
Browse files

[TASK] Partially revert method signature change for FileInterface->rename

This is a pre-patch for introducing a native enum for
DuplicationBehavior. In order to prevent changes to the signature of
`$conflictMode` two times, we omit the typehint `string` in v13 and will
change it in v14 immediately to native enum `DuplicationBehavior`.

Resolves: #102149
Related: #101294
Releases: main
Change-Id: I536151486b21f72bd2bc3959fc74e1124552af50
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81415


Reviewed-by: default avatarNikita Hovratov <nikita.h@live.de>
Tested-by: default avatarThomas Hohn <tho@gyldendal.dk>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarThomas Hohn <tho@gyldendal.dk>
Tested-by: default avatarNikita Hovratov <nikita.h@live.de>
Tested-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
parent f87e58d0
Branches
Tags
No related merge requests found
......@@ -479,7 +479,7 @@ abstract class AbstractFile implements FileInterface
* @param non-empty-string $newName The new file name
* @param DuplicationBehavior::* $conflictMode
*/
public function rename(string $newName, string $conflictMode = DuplicationBehavior::RENAME): FileInterface
public function rename(string $newName, $conflictMode = DuplicationBehavior::RENAME): FileInterface
{
if ($this->deleted) {
throw new \RuntimeException('File has been deleted.', 1329821482);
......
......@@ -114,7 +114,7 @@ interface FileInterface extends ResourceInterface
* @param non-empty-string $newName The new file name
* @param DuplicationBehavior::* $conflictMode
*/
public function rename(string $newName, string $conflictMode = DuplicationBehavior::RENAME): FileInterface;
public function rename(string $newName, $conflictMode = DuplicationBehavior::RENAME): FileInterface;
/*****************
* SPECIAL METHODS
......
......@@ -394,7 +394,7 @@ class FileReference implements FileInterface
* @param non-empty-string $newName The new file name
* @param DuplicationBehavior::* $conflictMode
*/
public function rename(string $newName, string $conflictMode = DuplicationBehavior::RENAME): FileInterface
public function rename(string $newName, $conflictMode = DuplicationBehavior::RENAME): FileInterface
{
// @todo Implement this function. This should only rename the
// FileReference (sys_file_reference) record, not the file itself.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment