94523[BUGFIX] Correctly use QueryResultInterface for PHPStan
Commit message
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
- typo3/sysext/extbase/Classes/Persistence/Generic/QueryResult.php+1 −1
- typo3/sysext/extbase/Classes/Persistence/QueryResultInterface.php+1 −1
- typo3/sysext/extbase/Classes/Persistence/Repository.php+3 −4
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/CategoryRepository.php+2 −0
Review log 1620
-
Markus Klein uploaded patch set 1 06/17/26, 12:29
-
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
-
Markus Klein uploaded patch set 2
V -106/17/26, 12:46 -
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
-
Oliver Klee voted on patch set 2 CR +1 V +1 06/17/26, 13:04
-
Simon Schaufelberger voted on patch set 2 CR +1 V +1 06/18/26, 08:55
-
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> ``` -
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)? -
Oliver Hader commented on patch set 2 V +1 06/18/26, 09:58
Reply
... accidentally set to `resolved` -
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.) -
Oliver Klee uploaded patch set 3
CR +1V +106/18/26, 10:14 -
Oliver Klee commented on patch set 3 CR +1 V +1 06/18/26, 10:14
Reply
Done -
Oliver Klee updated the commit message in patch set 4
CR +1V +106/18/26, 10:15 -
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
-
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
-
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 👍 -
Oliver Hader voted on patch set 4 CR +1 V +1 06/18/26, 10:31
-
Simon Schaufelberger voted on patch set 4 CR +1 V +1 06/18/26, 10:37
-
Oliver Hader voted on patch set 4 CR +2 V +2 06/18/26, 10:51
-
Oliver Hader merged patch set 5 06/18/26, 10:54