[TASK] Refactor metadata handling in FAL 08/57908/22
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Wed, 15 Aug 2018 07:36:35 +0000 (09:36 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 1 Feb 2019 17:53:47 +0000 (18:53 +0100)
commit1eb9162d935b2398ad2649fcecaa69c415b0d371
treedd8ed1a882bc0c32b2d8b35e37b596f1d9b4bdb0
parentd064c496f529bfb382172dfa479b3f74ace1429e
[TASK] Refactor metadata handling in FAL

Meta data of files handled by FAL is fetched, created and updated in
various places, which makes it hard to maintain the current code base.

Albeit the method `_getMetaData()` is marked as internal, it has been
marked as deprecated as well, because the method is widely used in the
TYPO3 extension universe.

For this reason, a MetaDataAspect is introduced that takes care of meta
data handling on a low-level basis.

In the same run, FAL's `Indexer` is now responsible for creating or
updating such meta data records, the `ResourceStorage` now only tells
whether auto-extraction is enabled. The meta data extraction, based on
registered extractors implementing the `ExtractorInterface` interface,
has been moved into a separate service class.

Resolves: #85895
Releases: master
Change-Id: Icb929a6226777dcea3868ee5c083cf13ff5a71f6
Reviewed-on: https://review.typo3.org/57908
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
14 files changed:
typo3/sysext/core/Classes/Resource/File.php
typo3/sysext/core/Classes/Resource/Index/Indexer.php
typo3/sysext/core/Classes/Resource/Index/MetaDataRepository.php
typo3/sysext/core/Classes/Resource/MetaDataAspect.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/Processing/FileDeletionAspect.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Resource/Service/ExtractorService.php [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Deprecation-85895-DeprecateFile_getMetaData.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Resource/FileTest.php
typo3/sysext/core/Tests/Unit/Resource/Index/IndexerTest.php
typo3/sysext/core/Tests/Unit/Resource/MetaDataAspectTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Resource/Service/ExtractorServiceTest.php [new file with mode: 0644]
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php