[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 ...
Please register or sign in to comment