Review main Abandoned

90483[TASK] Add native types to CategoryCollection

Elias Häußler CR -1 V -1 Normal +28 −49 updated 10/09/26, 16:37

Commit message

In addition, the behavior of EXT:frontend's CategoryCollection::create()
and CategoryCollection::load() is changed to avoid late static binding,
since this class is marked as internal and not meant to be extended by
third-party extensions.

Review

  • Code review CR -1
    • Oliver Klee +1
    • Benni Mack -1
  • Verified V -1
    • core-ci -1 CI

Issues 1

Files 2

Review log 1720

  1. Elias Häußler uploaded patch set 1 08/25/25, 06:54

  2. core-ci voted on patch set 1 V +1 08/25/25, 07:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83840

  3. Simon Schaufelberger commented on patch set 1 08/25/25, 07:46

    CategoryCollection.php:36

    I would leave this as native types have not been added here.
  4. Oliver Klee commented on patch set 1 08/25/25, 07:54

    CategoryCollection.php:96

    Why no native type declarations for `$id` and `$fillItems`? Would this break anything?
  5. Elias Häußler uploaded patch set 2 V +1 08/25/25, 08:01

  6. Elias Häußler commented on patch set 2 08/25/25, 08:02

    CategoryCollection.php:36 Reply

    Done

    CategoryCollection.php:96 Reply

    `$id` and `$fillItems` are defined in `\TYPO3\CMS\Core\Collection\PersistableCollectionInterface` (without types); thus, changes would be breaking. I'd love to harden types there as well, but I'm not sure how interface changes are handled properly (concerning the rule that extension authors should be able to support 2 LTS versions at the same time). Maybe @lolli@schwarzbu.ch can enlighten us a little bit here?
  7. core-ci voted on patch set 2 V +1 08/25/25, 08:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83843

  8. Oliver Klee voted on patch set 2 CR +1 08/25/25, 14:01

  9. Simon Schaufelberger wrote 08/25/25, 14:15

    Removed cc Simon Schaufelberger.
  10. Oliver Klee voted on patch set 2 V +1 08/26/25, 14:49

  11. Georg Ringer voted on patch set 2 CR +1 V +1 02/06/26, 20:29

  12. Oliver Klee commented on patch set 2 02/07/26, 08:58

    CategoryCollection.php:96 Reply

    Okay, resolving this for the time being then.
  13. Stefan Bürk commented on patch set 2 02/07/26, 12:31

    Unresolved

    `typo3/sysext/core/Classes/Category/Collection/CategoryCollection.php` is not marked internal. Not looked deeply into it, but the changes **could** make at least a backport not reasonable - if not out of the scope if breaking. Developer may use it for custom collections like the EXT:fronted collection. TBH - not reviewd deeply and tested this yet, just wanted to mentioned that **this** must be really checked and not simply following the commit message remark about internal only correct for EXT:frontend collection implementation.
  14. Stefan Bürk commented on patch set 2 CR -1 02/07/26, 12:39

    CategoryCollection.php:283 Unresolved

    I'd say that this is wrong and was before (wrong adoption): * `AbstractRecordCollection::$storage` uses annotation `\SplDoublyLinkedList` for the property. * `/** @var File $item */` in the method is `wrong` and maybe slipped at some point in time using the CategoryCollection for `sys_file` items - which must not be the case. Adopting this now for the `@return` annotation is therefor also wrong and needs to be more generic. This class is about `Category Collection to handle records attached to a category` and not about `files`.
  15. Benni Mack updated the commit message in patch set 3 CR +1 V +1 04/22/26, 06:40

  16. Oliver Klee voted on patch set 3 CR +1 04/22/26, 07:45

  17. core-ci voted on patch set 3 V -1 04/22/26, 08:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100753

  18. Christian Kuhn wrote 06/18/26, 23:04

    Removed cc Christian Kuhn.
  19. Benni Mack commented on patch set 3 CR -1 10/09/26, 16:27

    Unresolved

    ping. please rebase or abandon
  20. Elias Häußler abandoned the change 10/09/26, 16:37

    no time atm, maybe later