Review main Abandoned

66272[WIP][FEATURE] Introduce a lowlevel FileSystem API

Benni Mack CR 0 V 0 Expert +1006 −0 updated 09/07/21, 18:54

Commit message

Numerous functions are wrapped in GeneralUtility/t3lib_div
since ages.

However, the API has grown and nowadays, one would simply
put this logic in one single API class. This makes testing much
easier and make the GeneralUtility methods much smaller.

In addition, some methods are even parked in e.g. ExtensionManager
where they don't belong.

The new lowlevel FileSystem API (which is not related to FAL)
class helps to have everything regarding file / folder reading
for the server system in one place.

This way, a lot of workarounds in EM can be overcome.

Goals of the new API:
* No static methods
* Speaking method names, that only do one thing
* No hooks, but Event Listeners.
* Exceptions and proper return types
* Type hinting

Review

  • Code review CR 0
  • Verified V 0

Files 2

Review log 67

  1. Benni Mack uploaded patch set 1 10/23/20, 16:13

  2. TYPO3com voted on patch set 1 V -1 10/23/20, 16:14 Completed build in 22s on Fri, 23 Oct, 04:14 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6857

  3. Alexander Schnitzler commented on patch set 1 10/26/20, 08:51

    What do you think about using symfony/filesystem and similar packages here for several low level functions we don't have to reimplement then ourselves.
  4. Benni Mack commented on patch set 1 10/26/20, 13:08

    > Patch Set 1: > > What do you think about using symfony/filesystem and similar packages here for several low level functions we don't have to reimplement then ourselves. Thanks for the review and feedback! Already thought of that, the main reason I continued this path is that we provide some additional layers in our existing API - fixPermission - EXT: resolving - allowed paths (lockRootPath) and then Symfony's Filesystem API has some things just don't need.
  5. Alexander Schnitzler commented on patch set 1 10/26/20, 15:16

    > Patch Set 1: > > > Patch Set 1: > > > > What do you think about using symfony/filesystem and similar packages here for several low level functions we don't have to reimplement then ourselves. > Thanks for the review and feedback! > > Already thought of that, the main reason I continued this path is that we provide some additional layers in our existing API > - fixPermission > - EXT: resolving > - allowed paths (lockRootPath) > > and then Symfony's Filesystem API has some things just don't need. I don't think this patch would be superfluous. This class could still exist and be a wrapper for just some methods. wdyt?
  6. Benni Mack commented on patch set 1 11/30/20, 11:22

    > Patch Set 1: > > > Patch Set 1: > > > > > Patch Set 1: > > > > > > What do you think about using symfony/filesystem and similar packages here for several low level functions we don't have to reimplement then ourselves. > > Thanks for the review and feedback! > > > > Already thought of that, the main reason I continued this path is that we provide some additional layers in our existing API > > - fixPermission > > - EXT: resolving > > - allowed paths (lockRootPath) > > > > and then Symfony's Filesystem API has some things just don't need. > > I don't think this patch would be superfluous. This class could still exist and be a wrapper for just some methods. wdyt? We could add a wrapper, but I think Symfony's Filesystem API is not "sharp" enough for our use cases (you can chmod on iterable|string without having typehints). And I think the Symfony class is not as "speaking" as our existing code.
  7. Benni Mack abandoned the change 09/07/21, 18:54