Review main Merged

94523[BUGFIX] Correctly use QueryResultInterface for PHPStan

Markus Klein CR +2 V +2 Easy +7 −6 updated 06/18/26, 10:54

Commit message

It has 2 template variables, which must be specified.
Additionally, the `find*` methods never return an array.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1620

  1. Markus Klein uploaded patch set 1 06/17/26, 12:29

  2. core-ci voted on patch set 1 V -1 06/17/26, 12:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103609

  3. Markus Klein uploaded patch set 2 V -1 06/17/26, 12:46

  4. core-ci voted on patch set 2 V +1 06/17/26, 12:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103611

  5. Oliver Klee voted on patch set 2 CR +1 V +1 06/17/26, 13:04

  6. Simon Schaufelberger voted on patch set 2 CR +1 V +1 06/18/26, 08:55

  7. Oliver Hader commented on patch set 2 CR +1 06/18/26, 09:55

    Looks good to me, but I'm wondering whether it should be even taken a step further: ```patch diff --git a/typo3/sysext/extbase/Classes/Persistence/Generic/QueryResult.php b/typo3/sysext/extbase/Classes/Persistence/Generic/QueryResult.php index 67b0c412b30..67ffabfe4e8 100644 --- a/typo3/sysext/extbase/Classes/Persistence/Generic/QueryResult.php +++ b/typo3/sysext/extbase/Classes/Persistence/Generic/QueryResult.php @@ -27,7 +27,7 @@ use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; * * @todo v12: Candidate to declare final - Can be decorated or standalone class implementing the interface * @template TValue of object - * @implements QueryResultInterface<mixed,TValue> + * @implements QueryResultInterface<int,TValue> */ #[Autoconfigure(public: true, shared: false)] class QueryResult implements QueryResultInterface diff --git a/typo3/sysext/extbase/Classes/Persistence/QueryResultInterface.php b/typo3/sysext/extbase/Classes/Persistence/QueryResultInterface.php index 21aed886738..b3569d5f275 100644 --- a/typo3/sysext/extbase/Classes/Persistence/QueryResultInterface.php +++ b/typo3/sysext/extbase/Classes/Persistence/QueryResultInterface.php @@ -17,7 +17,7 @@ namespace TYPO3\CMS\Extbase\Persistence; /** * A lazy result list that is returned by Query::execute() - * @template TKey + * @template TKey of int * @template TValue of object * @extends \Iterator<TKey,TValue> * @extends \ArrayAccess<TKey,TValue> ```
  8. Oliver Hader commented on patch set 2 06/18/26, 09:56

    Besides that: Is the change in 13.4 required (personally, I'd be fine with it)?
  9. Oliver Hader commented on patch set 2 V +1 06/18/26, 09:58

    Reply

    ... accidentally set to `resolved`
  10. Oliver Klee commented on patch set 2 06/18/26, 10:05

    Reply

    I personally as an extension developer would benefit greatly from the 13.4 backport. (I get lots of PHPStan warnings about this in my own extensions.)
  11. Oliver Klee uploaded patch set 3 CR +1 V +1 06/18/26, 10:14

  12. Oliver Klee commented on patch set 3 CR +1 V +1 06/18/26, 10:14

    Reply

    Done
  13. Oliver Klee updated the commit message in patch set 4 CR +1 V +1 06/18/26, 10:15

  14. core-ci voted on patch set 3 V +1 06/18/26, 10:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103635

  15. core-ci voted on patch set 4 V +1 06/18/26, 10:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103636

  16. Oliver Hader commented on patch set 4 06/18/26, 10:30

    Reply

    All good, thanks for the feedback. Let's keep `13.4` then 👍
  17. Oliver Hader voted on patch set 4 CR +1 V +1 06/18/26, 10:31

  18. Simon Schaufelberger voted on patch set 4 CR +1 V +1 06/18/26, 10:37

  19. Oliver Hader voted on patch set 4 CR +2 V +2 06/18/26, 10:51

  20. Oliver Hader merged patch set 5 06/18/26, 10:54