[TASK] Clean-up responsibilities of FAL classes
The FileRepository, ResourceStorage and ResourceFactory all somehow take care of creating files, managing files and their data. Getting a file from ResourceStorage->getFile never involves the index-Records and even if index records exists the driver always needs to query all file information out of the filesystem to create FileObject. As we always expect the index-record to be up to date we can rely on that and must not query the file-system for every bit of information. In addition creating objects without looking for the record first renders the FAL API useless. This patch introduces a FileIndexRepository which only deals with these kind of records and deprecates the methods within the FileRepository. In addition it moves around the "file-object creation logic" so this is dealt with at a central place: The Resource Factory. Finally the ResourceFactory always uses to get an IndexRecord from the newly introduced Repository. If the FileInfo is not present, it queries the Storage for the fileInfo (from the Driver). Releases: 6.2 Resolves: #51528 Change-Id: I6ceeb8db4dd4e470e7c72dcfbc2121093411da75 Reviewed-on: https://review.typo3.org/23839 Reviewed-by: Ernesto Baschny Tested-by: Ernesto Baschny Reviewed-by: Frans Saris Tested-by: Frans Saris Reviewed-by: Markus Klein Tested-by: Markus Klein Reviewed-by: Steffen Ritter Tested-by: Steffen Ritter
parent
376d3b52
Please register or sign in to comment