Review main Merged Breaking

65184[!!!][TASK] FAL: Decouple logic of ResourceFactory into StorageRepository

Benni Mack CR +2 V +2 Expert +585 −448 updated 09/30/20, 14:22

Commit message

The "ResourceFactory" class was introduced as a "god class" to build
any File/Folder object (from a string, DB row or integer), but is also
there for building sys_file_storage (ResourceStorage) objects, so it is
mixing a lot of concerns (also driver setup).

However, all creation of ResourceStorage objects should be moved into
the StorageRepository (which already exists), thus reducing
the dependencies towards ResourceFactory.

This makes it much easier to not juggle with storage UIDs anymore
but actually work with storage objects throughout the internal FAL
API.

The StorageRepository is not extending from the AbstractRepository
anymore, which is breaking.

Review

  • Code review CR +2 Done
    • Helmut Hummel +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Helmut Hummel +2
    • Georg Ringer +1
    • TYPO3com +1 CI

Issues 1

Files 27

Show 7 more files

Review log 2741

Show 916 earlier messages
  1. Benni Mack uploaded patch set 1 08/05/20, 09:19

  2. TYPO3com voted on patch set 1 V -1 08/05/20, 09:30 Completed build in 10m 56s on Wed, 5 Aug, 09:30 AM Test Summary: 7682 of 73348 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4414

  3. Benni Mack uploaded patch set 2 08/14/20, 20:35

  4. TYPO3com voted on patch set 2 V -1 08/14/20, 20:47 Completed build in 11m 42s on Fri, 14 Aug, 08:47 PM Test Summary: 1301 of 68480 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4668

  5. Benni Mack uploaded patch set 3 08/31/20, 10:14

  6. TYPO3com voted on patch set 3 V -1 08/31/20, 10:28 Completed build in 13m 30s on Mon, 31 Aug, 10:27 AM Test Summary: 2125 of 73631 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5077

  7. Benni Mack uploaded patch set 4 08/31/20, 10:59

  8. TYPO3com voted on patch set 4 V -1 08/31/20, 11:11 Completed build in 11m 31s on Mon, 31 Aug, 11:11 AM Test Summary: 330 of 73631 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5080

  9. Benni Mack uploaded patch set 5 08/31/20, 11:47

  10. TYPO3com voted on patch set 5 V -1 08/31/20, 11:58 Completed build in 11m 00s on Mon, 31 Aug, 11:58 AM Test Summary: 72 of 73631 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5083

  11. Benni Mack uploaded patch set 6 08/31/20, 12:15

  12. TYPO3com voted on patch set 6 V +1 08/31/20, 12:26 Completed build in 11m 00s on Mon, 31 Aug, 12:26 PM Test Summary: 73146 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5084

  13. Benni Mack uploaded patch set 7 09/07/20, 09:24

  14. TYPO3com voted on patch set 7 V +1 09/07/20, 09:35 Completed build in 11m 26s on Mon, 7 Sep, 09:35 AM Test Summary: 73227 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5316

  15. Benni Mack uploaded patch set 8 09/11/20, 11:13

  16. Benni Mack updated the commit message in patch set 9 09/11/20, 11:14

  1. TYPO3com voted on patch set 8 V -1 09/11/20, 11:27 Completed build in 13m 11s on Fri, 11 Sep, 11:27 AM Test Summary: 132 of 73694 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5538

  2. TYPO3com voted on patch set 9 V -1 09/11/20, 11:32 Completed build in 17m 51s on Fri, 11 Sep, 11:32 AM Test Summary: 132 of 73694 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5539

  3. Benni Mack uploaded patch set 10 09/12/20, 17:43

  4. TYPO3com voted on patch set 10 V +1 09/12/20, 17:55 Completed build in 12m 20s on Sat, 12 Sep, 05:55 PM Test Summary: 73209 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5560

  5. Simon Gilli updated the commit message in patch set 11 09/12/20, 18:51

  6. Benjamin Franzke commented on patch set 11 09/12/20, 18:57

    @gilbertsort: "god class" is not a typo, it is a judgement ;) The context makes that quite clear… So "good class" is actually wrong now. The preposition "to build" may have been a bit confusing, therefore this may better be: "seems to be a god class that builds"

    FileIndexRepository.php:126 Unresolved

    Constructor bases dependency injection (instead of GU:makeInstance) for a new dependency in a singleton please.
  7. TYPO3com voted on patch set 11 V +1 09/12/20, 19:09 Completed build in 14m 41s on Sat, 12 Sep, 07:09 PM Test Summary: 73208 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5564

  8. Benni Mack uploaded patch set 12 09/12/20, 19:11

  9. TYPO3com voted on patch set 12 V +1 09/12/20, 19:26 Completed build in 14m 46s on Sat, 12 Sep, 07:26 PM Test Summary: 73208 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5566

  10. Simon Gilli voted on patch set 12 CR +1 09/13/20, 09:33

  11. Simon Gilli commented on patch set 12 09/13/20, 09:34

    Reply

    Oops, sorry for that
  12. Oliver Klee commented on patch set 13 09/13/20, 11:22

    Published edit on patch set 12.
  13. TYPO3com voted on patch set 13 V +1 09/13/20, 11:34 Completed build in 12m 13s on Sun, 13 Sep, 11:34 AM Test Summary: 73209 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5577

  14. Benni Mack commented on patch set 13 09/14/20, 07:50

    Thx, @Oli
  15. Helmut Hummel commented on patch set 13 09/15/20, 07:37

    great cleanup

    ProcessedFileRepository.php:91 Unresolved

    That line looks kind of pointless now. Maybe remove it and even deprecate or remove the setter?

    StorageRepository.php:331 Unresolved

    this method can never return null. it is always an object or a fatal error occurs or an exception is thrown

    ExtendedFileUtility.php:1094 Unresolved

    I guess this line is obsolete, too, don't you think?
  16. Benni Mack uploaded patch set 14 09/15/20, 11:56

  17. TYPO3com voted on patch set 14 V +1 09/15/20, 12:09 Completed build in 13m 00s on Tue, 15 Sep, 12:09 PM Test Summary: 73272 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5627

  18. Benni Mack commented on patch set 14 09/15/20, 12:17

    > Patch Set 13: > > (3 comments) > > great cleanup @helhum: Thanks for your remarks! Incorporated all the changes.
  19. Helmut Hummel voted on patch set 14 CR +1 09/28/20, 12:09

  20. Georg Ringer commented on patch set 14 09/28/20, 12:36

    shouldn't we now deprecate also all methods in resourcefactory which have been moved?
  21. Benni Mack commented on patch set 14 09/29/20, 06:59

    > Patch Set 14: > > shouldn't we now deprecate also all methods in resourcefactory which have been moved? I left them there on purpose (thought it was on the commit message, but it isn't) because the methods do not hurt, so migration can be done over multiple major versions.
  22. Georg Ringer voted on patch set 14 V +1 CR +1 09/29/20, 08:38

  23. Helmut Hummel voted on patch set 14 V +2 CR +2 09/30/20, 13:16

  24. Helmut Hummel merged patch set 15 09/30/20, 13:16

  25. Benni Mack commented on patch set 15 09/30/20, 14:22

    Thank you for your reviews!