Breaking: #92289 - Decouple logic of ResourceFactory into StorageRepository
See forge#92289
Description
The
Resource
class was initially created for the File Abstraction Layer (FAL)
as a Factory class, which created PHP objects.
However, in the recent years, it became apparent that it is more useful to separate the concerns of the creation and retrieving of existing information.
For this reason, the
Storage
class is now handling the creation of
Resource
objects. This layer accesses the Database and the needed Driver
objects and configuration.
The
Storage
class does not extend from
Abstract
anymore,
and is available standalone.
Most of the logic in the
Resource
concerning Storages has been moved to
Storage
, which has a lot of options available now.
The following methods within
Resource
have been marked
as internal, and are kept for backwards-compatibility without deprecation:
Resource
Factory->get Default Storage () Resource
Factory->get Storage Object () Resource
Factory->convert Flex Form Data To Configuration Array () Resource
Factory->create Storage Object () Resource
Factory->create Folder Object () Resource
Factory->get File Object By Storage And Identifier () Resource
Factory->get Storage Object From Combined Identifier ()
The following method has been removed
Resource
Factory->get Driver Object ()
Impact
Calling the removed method will throw a fatal error.
Checking
Storage
for an instance of
Abstract
will have different results.
Affected Installations
TYPO3 installations with specific third-party extensions working with the FAL API directly might use the existing functionality.
Migration
Migrate to the
Storage
API in the third-party extension code.