Review main Merged Breaking

81081[!!!][TASK] Decouple FileRepository and ProcessedFileRepository

Benni Mack CR +2 V +2 Hard +256 −616 updated 09/19/23, 13:55

Commit message

When FAL was introduced in TYPO3 v6.0, some concepts
were introduced which aren't so smart, 11 years later.

* Building an AbstractRepository
* Using Extbase RepositoryInterface in FAL repositories

The shared code between the two implementing
classes, FileRepository and AbstractFileRepository
isn't justified to use an AbstractRepository which
dynamically creates objects through inheritance
for its subclass repositories.

Instead, the AbstractRepository is now removed and
both FileRepository and ProcessedFileRepository
are now free, and can also use DI in a way it was meant.

For this reason, the whole AbstractRepository class
within the "TYPO3\CMS\Core\Resource" namespace is removed
along with the dependency to Extbase in this regard.

FileRepository and ProcessedFileRepository now only
contain the methods they require, and all methods and
properties are fully typed.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Andreas Nedbal +1
    • Oliver Klee +1
    • Göran Bodenschatz +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benni Mack +2
    • Andreas Nedbal +1
    • Oliver Klee +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 14

Review log 2331

Show 46 earlier messages
  1. Benni Mack uploaded patch set 1 09/19/23, 09:18

  2. core-ci voted on patch set 1 V -1 09/19/23, 09:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46746

  3. Oliver Klee commented on patch set 1 09/19/23, 09:50

    FileRepository.php:54

    This check is not needed anymore as `$uid` is now typed as `int`.
  4. Benni Mack uploaded patch set 2 V -1 09/19/23, 10:04

  5. core-ci voted on patch set 2 V -1 09/19/23, 10:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46751

  6. Benni Mack uploaded patch set 3 V -1 09/19/23, 10:25

  1. Benni Mack commented on patch set 3 09/19/23, 10:26

    FileRepository.php:54 Reply

    Done
  2. core-ci voted on patch set 3 V -1 09/19/23, 10:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46753

  3. Benni Mack uploaded patch set 4 V -1 09/19/23, 10:37

  4. core-ci voted on patch set 4 V -1 09/19/23, 10:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46756

  5. Oliver Klee commented on patch set 4 CR -1 09/19/23, 10:53

    Duplicate exception code 1314354065 in file: sysext/core/Classes/Resource/FileRepository.php
  6. Benni Mack uploaded patch set 5 CR -1 V -1 09/19/23, 11:16

  7. core-ci voted on patch set 5 V -1 09/19/23, 11:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46762

  8. Benni Mack uploaded patch set 6 V -1 09/19/23, 11:35

  9. Göran Bodenschatz commented on patch set 5 09/19/23, 11:38

    FileRepository.php:82

    `* @return FileReference[] An array of objects, empty if no objects found`

    FileRepository.php:164

    `* @return FileReference[]`

    Breaking-101948-FileBasedAbstractRepositoryClassRemoved.rst:38

    ```that arose around :php:`AbstractRepository`.``` (space removed)
  10. core-ci voted on patch set 6 V +1 09/19/23, 11:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46764

  11. Oliver Klee commented on patch set 6 09/19/23, 11:48

    FileRepository.php:164 Reply

    Then we'll also need this: `@param FileReference[]`
  12. Benni Mack uploaded patch set 7 V +1 09/19/23, 11:55

  13. Benni Mack commented on patch set 7 09/19/23, 11:56

    FileRepository.php:82 Reply

    Done

    FileRepository.php:164 Reply

    Done

    Breaking-101948-FileBasedAbstractRepositoryClassRemoved.rst:38 Reply

    Done
  14. Oliver Klee commented on patch set 6 V +1 09/19/23, 11:58

    Looks very good all in all! I've added my comments on a few smaller things.

    FileRepository.php:187

    `@return 'FE|BE'`

    ProcessedFileRepository.php:130

    Can we directly use the `Context` instead (and split this into two statements instead of having one statement with two assignments)?
  15. core-ci voted on patch set 7 V +1 09/19/23, 12:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46770

  16. Benni Mack uploaded patch set 8 V +1 09/19/23, 12:38

  17. Oliver Klee commented on patch set 8 09/19/23, 12:39

    FileRepository.php:187 Reply

    Done
  18. core-ci voted on patch set 8 V +1 09/19/23, 12:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46776

  19. Benni Mack commented on patch set 8 09/19/23, 12:49

    ProcessedFileRepository.php:130 Reply

    Done
  20. Christian Kuhn voted on patch set 8 V +1 CR +1 09/19/23, 13:05

  21. Göran Bodenschatz voted on patch set 8 CR +1 09/19/23, 13:44

  22. Andreas Nedbal voted on patch set 8 V +1 CR +1 09/19/23, 13:54

  23. Oliver Klee voted on patch set 8 V +1 CR +1 09/19/23, 13:55

  24. Benni Mack voted on patch set 8 V +2 CR +2 09/19/23, 13:55

  25. Benni Mack merged patch set 9 09/19/23, 13:55