[BUGFIX] Avoid type errors in `ResourceFactory` methods
With #92289 logic has been decoupled from `ResourceFactory` into the `StorageRepository`. As a side change, native php types have been added to a couple of methods. `StorageRepository->findByUid()` parameter type has been set to integer, which breaks the `null` fallback and retrieving the default storage `uid: 0` in `ResourceFactory` method `getStorageObjectFromCombinedIdentifier()`. Even worse is the fact that `getObjectFromCombinedIdentifier()` does not even try to cope with a invalid identifier provided. This change modifies `getObjectFromCombinedIdentifier()` and `getStorageObjectFromCombinedIdentifier` of `ResourceFactory` to cope with missing storage identifier by falling back to the default storage (`0`) with a shuffle of the exploded values. As a side-effect two PHPStan ignore patterns can be removed from the PHPStan baseline file. Used command(s): Build/Scripts/runTests.sh -s phpstanGenerateBaseline Resolves: #102692 Related: #92289 Releases: main, 12.4, 11.5 Change-Id: I8ee9736839f59db7917cb49dd0d62af17ee28cda Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82233 Tested-by:Stefan Bürk <stefan@buerk.tech> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
Please register or sign in to comment