stable

Clone or download

Read-only

Refactoring: do not rely on id for upload path

For some implementations of file upload via tus.io in Tuleap, file information id won't be enough. In order to prepare the path for such implementations, PathAllocator::getPathForItemBeingUploaded now relies on FileInformation instead of an $id. This has the advantage to wrap the primitive $id (without any type) in a dedicated object and enforces type. No functional changes. Part of story #12813: upload files with FRS REST API Change-Id: I14d28a933f1048396940ca91576c7c056e8360b9

Modified Files

Name
M plugins/docman/include/REST/v1/EmptyFileToUploadFinisher.php +3 −2 Go to diff View file
M plugins/docman/include/Upload/Document/DocumentBeingUploadedInformationProvider.php +14 −3 Go to diff View file
M plugins/docman/include/Upload/Document/DocumentUploadCanceler.php +1 −1 Go to diff View file
M plugins/docman/include/Upload/Document/DocumentUploadFinisher.php +1 −1 Go to diff View file
M plugins/docman/include/Upload/Document/DocumentUploadPathAllocator.php +4 −6 Go to diff View file
M plugins/docman/include/Upload/UploadPathAllocator.php +2 −1 Go to diff View file
M plugins/docman/include/Upload/Version/VersionBeingUploadedInformationProvider.php +15 −3 Go to diff View file
M plugins/docman/include/Upload/Version/VersionUploadCanceler.php +1 −1 Go to diff View file
M plugins/docman/include/Upload/Version/VersionUploadFinisher.php +1 −1 Go to diff View file
M plugins/docman/include/Upload/Version/VersionUploadPathAllocator.php +4 −6 Go to diff View file
M plugins/docman/phpunit/Upload/Document/DocumentUploadCancelerTest.php +3 −3 Go to diff View file
M plugins/docman/phpunit/Upload/Document/DocumentUploadCleanerTest.php +5 −2 Go to diff View file
M plugins/docman/phpunit/Upload/Document/DocumentUploadFinisherTest.php +4 −2 Go to diff View file
M plugins/docman/phpunit/Upload/Document/DocumentUploadPathAllocatorTest.php +3 −2 Go to diff View file
M plugins/docman/phpunit/Upload/Version/VersionUploadCancelerTest.php +3 −3 Go to diff View file
M plugins/docman/phpunit/Upload/Version/VersionUploadCleanerTest.php +5 −2 Go to diff View file
M plugins/docman/phpunit/Upload/Version/VersionUploadFinisherTest.php +3 −1 Go to diff View file
M plugins/docman/phpunit/Upload/Version/VersionUploadPathAllocatorTest.php +3 −2 Go to diff View file
M src/common/Upload/FileBeingUploadedLocker.php +1 −1 Go to diff View file
M src/common/Upload/FileBeingUploadedWriter.php +1 −1 Go to diff View file
M src/common/Upload/PathAllocator.php +3 −1 Go to diff View file
M tests/phpunit/common/Upload/FileBeingUploadedWriterTest.php +2 −2 Go to diff View file