77825[TASK] Make extbase repository generic (phpstan-wise)
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Christian Kuhn +1
-
Verified V +2 Done
- Stefan Bürk +2
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 17
- Build/phpstan/phpstan-baseline.neon+17 −7
- Build/Scripts/annotationChecker.php2+2 −0
- typo3/sysext/belog/Classes/Domain/Repository/LogEntryRepository.php+1 −0
- typo3/sysext/beuser/Classes/Domain/Repository/BackendUserGroupRepository.php+2 −1
- typo3/sysext/beuser/Classes/Domain/Repository/BackendUserRepository.php+2 −0
- typo3/sysext/beuser/Classes/Domain/Repository/FileMountRepository.php+2 −0
- typo3/sysext/core/Classes/Resource/AbstractRepository.php6+16 −1
- typo3/sysext/core/Classes/Resource/FileRepository.php+1 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Classes/Controller/AbstractController.php+2 −2
- typo3/sysext/extbase/Classes/Persistence/Repository.php12+14 −6
- typo3/sysext/extbase/Classes/Persistence/RepositoryInterface.php+8 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/AdministratorRepository.php+2 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/BlogRepository.php+2 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/PersonRepository.php+2 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/PostRepository.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/TtContentRepository.php+2 −0
- typo3/sysext/extensionmanager/Classes/Domain/Repository/ExtensionRepository.php3+1 −0
Review log 2329
Show 24 earlier messages
-
Alexander Schnitzler uploaded patch set 1 02/10/23, 13:50
-
Alexander Schnitzler uploaded patch set 2 02/10/23, 13:51
-
core-ci voted on patch set 2 V -1 02/10/23, 14:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37560
-
core-ci voted on patch set 1 V -1 02/10/23, 14:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37559
-
Oliver Klee commented on patch set 2 02/10/23, 14:54
We'll need to add the corresponding annotation to the allowlist in Build/Scripts/annotationChecker.php. -
Alexander Schnitzler uploaded patch set 3
V -102/11/23, 19:21 -
Alexander Schnitzler uploaded patch set 4 02/11/23, 19:37
-
core-ci voted on patch set 3 V -1 02/11/23, 19:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37609
-
Oliver Klee commented on patch set 4 02/11/23, 19:38
AbstractRepository.php:30Schouldn't that be "T of \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface"?AbstractRepository.php:279Can't we use @return instead of most of the @phpstan-return?Repository.php:37class-string<T> -
Oliver Klee commented on patch set 4 02/11/23, 19:39
ExtensionRepository.php:32For all @extends, we can also use the short class name AFAIK. -
Alexander Schnitzler commented on patch set 4 02/11/23, 19:45
annotationChecker.php:76This change has potential for a huge discussion. I remember a decision against using "@phpstan-"-variants of annotations but we do in fact use phpstan in the core and using those in addition to regular annotations adds more information for static code analysis, not all IDE's or even phpdoc itself can handle. Take numeric-string for instance. We can of course just use @param numeric-string $uid and potentially break code analysis of several IDE's or we can simply add more information via @phpstan-param numeric-string $uid. This way we stay backwards compatible but also let phpstan know more about the code base. Just a little off topic. makeInstance() does in fact already use @param class-string and my IDE does not understand it anymore. It thinks, makeInstance() expects an instance of \TYPO3\CMS\Core\Utility\class-string, which of course does not exist... -
Alexander Schnitzler commented on patch set 4 02/11/23, 19:48
AbstractRepository.php:30ReplyActually not. Those FAL-objects don't implement the extbase interface, but their repositories implement the extbase repository interface.AbstractRepository.php:279ReplyPlease see my comment for this on the annotationChecker.php file.Repository.php:37ReplyPlease see my comment for this on the annotationChecker.php file.ExtensionRepository.php:32ReplyI think it depends on whether there is an include or not. Have to check again. -
Oliver Klee commented on patch set 4 02/11/23, 19:58
annotationChecker.php:76ReplyAckAbstractRepository.php:30ReplyAckAbstractRepository.php:279ReplyAckRepository.php:37ReplyAck -
Oliver Klee commented on patch set 4 02/11/23, 20:12
Repository.php:117QueryResultInterface (over a few hops) already extends iterable. So iterable<T> should be sufficient. -
core-ci voted on patch set 4 V -1 02/11/23, 20:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37610
-
Christian Kuhn commented on patch set 4 02/13/23, 12:07
Repository.php:117ReplyDoneExtensionRepository.php:32Replydoes not harm much to keep FQDN's here, i suppose. -
Christian Kuhn commented on patch set 4 02/13/23, 12:10
Repository.php:117Replystill, it's needed for toArray() and friends, going with QueryResultInterface should do, though. -
Christian Kuhn uploaded patch set 5
V -102/13/23, 12:10 -
Christian Kuhn commented on patch set 4 02/13/23, 12:11
Repository.php:117Replyboth need to stay since it could return array, too. -
core-ci voted on patch set 5 V +1 02/13/23, 12:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37644
-
Christian Kuhn uploaded patch set 6
V +102/13/23, 12:19 -
core-ci voted on patch set 6 V +1 02/13/23, 12:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37645
-
Christian Kuhn voted on patch set 6 V +1 CR +1 02/13/23, 13:11
-
Stefan Bürk voted on patch set 6 V +2 CR +2 02/13/23, 18:27
-
Stefan Bürk merged patch set 7 02/13/23, 18:27
-
Alexander Schnitzler commented on patch set 7 02/13/23, 19:09
Repository.php:100This was a mistake. Need to revert the T for regular @param tag.Repository.php:149This was a mistake. Need to revert the T for regular @param tag -
Stefan Bürk commented on patch set 7 02/14/23, 16:18
Repository.php:100ReplyWill you come up with a follow up patch ? -
Alexander Schnitzler commented on patch set 7 02/14/23, 18:04
Repository.php:100ReplyI put it as drive-by changes into this one: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77846 -
Alexander Schnitzler commented on patch set 7 02/14/23, 18:04
Repository.php:149Reply