78014[FEATURE] Introduce non-magic repository find methods
Commit message
Review
-
Code review CR +2 Done
- Nikita Hovratov +2
- Oliver Klee +1
- Markus Klein +1
- Benni Mack +1
-
Verified V +2 Done
- Nikita Hovratov +2
- Oliver Klee +1
- Markus Klein +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 9
- Build/phpstan/phpstan-baseline.neon+26 −26
- typo3/sysext/core/Documentation/Changelog/12.3/Deprecation-100071-MagicRepositoryFindByMethods.rst2new+82 −0
- typo3/sysext/core/Documentation/Changelog/12.3/Feature-100071-IntroduceNon-magicRepositoryFindMethods.rstnew+51 −0
- typo3/sysext/extbase/Classes/Persistence/Repository.php33+72 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/RepositoryTest.phpnew+308 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/RepositoryTest.php+0 −91
- typo3/sysext/extbase/Tests/UnitDeprecated/Persistence/RepositoryTest.php6new+194 −0
- typo3/sysext/extensionmanager/Classes/Utility/DependencyUtility.php+1 −1
- typo3/sysext/extensionmanager/Tests/Unit/Utility/DependencyUtilityTest.php+4 −4
Review log 5569
Show 3344 earlier messages
-
Alexander Schnitzler uploaded patch set 1 03/03/23, 11:09
-
Alexander Schnitzler marked it work in progress 03/03/23, 11:09
-
Alexander Schnitzler wrote 03/03/23, 11:09
Topic set to extbase -
core-ci voted on patch set 1 V -1 03/03/23, 11:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38351
-
Alexander Schnitzler uploaded patch set 2
V -103/03/23, 12:44 -
core-ci voted on patch set 2 V -1 03/03/23, 13:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38356
-
Alexander Schnitzler uploaded patch set 3
V -103/03/23, 14:06 -
core-ci voted on patch set 3 V +1 03/03/23, 14:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38361
-
Alexander Schnitzler uploaded patch set 4
V +103/03/23, 14:34 -
Alexander Schnitzler commented on patch set 4 03/03/23, 14:34
This change is ready for review. -
core-ci voted on patch set 4 V +1 03/03/23, 14:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38363
-
Oliver Klee commented on patch set 4 03/04/23, 09:40
I really love this feature! Thanks a lot, Alexander! I've added some minor comments.Repository.php:268Those array keys probably all should be `non-empty-string` (in all newly-added array annotations).Repository.php:269For all `array<string,Foo>`, please generally let's have a space after the comma for improved readability: `array<string, Foo>`Repository.php:272`$limit` and `$offset` should have `@param 0|positive-int|null` annotations.Repository.php:281This is not a boolean. Please let's make the condition explicit: `if is_array($orderBy)) {`Repository.php:285This is not a boolean. Please let's make the condition explicit: `if is_int($limit)) {`Repository.php:289This is not a boolean. Please let's make the condition explicit: `if is_int($offset)) {`Repository.php:302To reduce code duplication, I this method could call `findBy`.Repository.php:309This is not a boolean. Please let's make the condition explicit: `if is_array($orderBy)) {`Repository.php:322@phpstan-return 0|positive-intRepositoryTest.php:38This should be an intersection type, not a union type.RepositoryTest.php:45Please let's use native type declarations for all those properties. -
Alexander Schnitzler commented on patch set 4 03/04/23, 11:25
Repository.php:268ReplyAckRepository.php:269ReplyAckRepository.php:272ReplyAckRepository.php:281ReplyAckRepository.php:285ReplyAckRepository.php:289ReplyAckRepository.php:302ReplyAckRepository.php:309ReplyAckRepository.php:322ReplyAckRepositoryTest.php:38ReplyThis is copy paste code of the same test in namespace Unit instead of UnitDeprecated. This code will be removed in 13.0, so I suggest to simply leave it as is.RepositoryTest.php:45ReplyThis is copy paste code of the same test in namespace Unit instead of UnitDeprecated. This code will be removed in 13.0, so I suggest to simply leave it as is. -
Alexander Schnitzler uploaded patch set 5
V +103/04/23, 11:48 -
Alexander Schnitzler commented on patch set 5 03/04/23, 11:49
Repository.php:268ReplyDoneRepository.php:269ReplyDoneRepository.php:272ReplyDoneRepository.php:281ReplyDoneRepository.php:285ReplyDoneRepository.php:289ReplyDoneRepository.php:302ReplyDoneRepository.php:309ReplyDoneRepository.php:322ReplyDone -
core-ci voted on patch set 5 V +1 03/04/23, 11:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38435
-
Oliver Klee commented on patch set 5 03/04/23, 12:03
RepositoryTest.php:38ReplyAck -
Oliver Klee commented on patch set 5 03/04/23, 12:03
RepositoryTest.php:45ReplyAck -
Oliver Klee voted on patch set 5 V +1 CR +1 03/04/23, 12:04
-
Simon Schaufelberger commented on patch set 5 V +1 CR +1 03/04/23, 13:27
thank you, love this patch! -
Markus Klein commented on patch set 5 03/04/23, 20:40
Repository.php:321Since calling logicalAnd with only one constraint creates some really weird SQL conditions. Maybe we should handle that case here. -
Alexander Schnitzler commented on patch set 5 03/05/23, 10:05
Repository.php:321ReplyGood catch, will update a new patch set. -
Alexander Schnitzler rebased onto patch set 6
CR +1V +103/05/23, 10:24 -
Alexander Schnitzler uploaded patch set 7 03/05/23, 10:25
-
Alexander Schnitzler uploaded patch set 8 03/05/23, 10:27
-
core-ci voted on patch set 6 V -1 03/05/23, 10:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38485
-
core-ci voted on patch set 8 V +1 03/05/23, 10:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38487
-
Oliver Klee commented on patch set 8 V +1 CR +1 03/05/23, 11:19
Repository.php:321ReplyDone -
core-ci voted on patch set 7 V +1 03/05/23, 11:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38486
-
Markus Klein voted on patch set 8 V +1 CR +1 03/06/23, 09:27
-
Alexander Schnitzler commented on patch set 8 CR -1 03/06/23, 09:30
Benni approached me and we will not deprecate magic methods yet. Will push a new patch set. -
Alexander Schnitzler uploaded patch set 9
CR +1V +103/06/23, 09:33 -
core-ci voted on patch set 9 V +1 03/06/23, 09:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38525
-
Alexander Schnitzler uploaded patch set 10
V +103/06/23, 09:47 -
Alexander Schnitzler commented on patch set 10 03/06/23, 09:48
Sorry for the confusion. The idea is to mark magic methods deprecated and to communicate the decision now but only trigger an error as of v13. -
Oliver Klee voted on patch set 10 V +1 CR +1 03/06/23, 09:54
-
Oliver Klee voted on patch set 10 V 0 03/06/23, 09:55
-
core-ci voted on patch set 10 V +1 03/06/23, 10:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38528
-
Nikita Hovratov uploaded patch set 11
CR +1V +103/06/23, 10:20 -
core-ci voted on patch set 11 V +1 03/06/23, 10:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38536
-
Oliver Klee voted on patch set 11 V +1 CR +1 03/06/23, 10:32
-
Nikita Hovratov voted on patch set 11 V +1 CR +1 03/06/23, 10:39
-
Stefan Froemken commented on patch set 11 V +1 CR +1 03/06/23, 17:35
Thank you. Good work. Tested all new methods with one of my example extension for V12. -
Markus Klein commented on patch set 11 03/07/23, 08:10
Will adjust the rstsDeprecation-100071-IntroduceNon-magicRepositoryFindMethods.rst:22IDEsDeprecation-100071-IntroduceNon-magicRepositoryFindMethods.rst:49IDEsDeprecation-100071-IntroduceNon-magicRepositoryFindMethods.rst:62remove such adjectives, this is subjective to the reader usually
-
Markus Klein commented on patch set 12
CR +1V +103/07/23, 08:11Published edit on patch set 11. -
Markus Klein commented on patch set 12 03/07/23, 08:12
Deprecation-100071-IntroduceNon-magicRepositoryFindMethods.rst:22ReplyDoneDeprecation-100071-IntroduceNon-magicRepositoryFindMethods.rst:49ReplyDoneDeprecation-100071-IntroduceNon-magicRepositoryFindMethods.rst:62ReplyDone -
Markus Klein voted on patch set 12 V +1 CR +1 03/07/23, 08:13
-
core-ci voted on patch set 12 V +1 03/07/23, 08:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38580
-
Nikita Hovratov voted on patch set 12 V +1 CR +1 03/07/23, 08:34
-
JAKOTA Design Group GmbH commented on patch set 12 03/07/23, 08:50
Repository.php:324I know this is just a type save reimplementation. But something I always wondered, isn't it a bit wasteful to retrieve all the data from the db just to count the rows? Or do I get this totally wrong? -
Nikita Hovratov commented on patch set 12 03/07/23, 09:07
Repository.php:324ReplyfindBy doesn't actually execute a real SQL statement yet. QueryResultInterface is a lazy result object. So by using `count` on it, it will result in something like `SELECT COUNT(*)`. -
JAKOTA Design Group GmbH commented on patch set 12 03/07/23, 09:30
Repository.php:324ReplyOk, Thanks. I thought $query->execute() does exactly that. Good to know. -
Oliver Klee voted on patch set 12 V +1 CR +1 03/07/23, 10:23
-
Benni Mack commented on patch set 12 CR -2 03/07/23, 10:39
will adapt the RSTs.-.. -
Stefan Froemken voted on patch set 12 V +1 CR +1 03/07/23, 10:53
-
Benni Mack uploaded patch set 13
CR +1V +103/07/23, 11:41Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR is:MIN") -
Benni Mack voted on patch set 13 V +1 CR +1 03/07/23, 11:41
-
core-ci voted on patch set 13 V +1 03/07/23, 11:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38591
-
Oliver Klee voted on patch set 13 V +1 CR +1 03/07/23, 12:00
-
Nikita Hovratov commented on patch set 13 03/07/23, 12:20
Deprecation-100071-MagicRepositoryFindByMethods.rst:33they will trigger a deprecation notice in v13. This sentence needs rework. -
Nikita Hovratov uploaded patch set 14
CR +1V +103/07/23, 12:22 -
Nikita Hovratov commented on patch set 13 03/07/23, 12:23
Deprecation-100071-MagicRepositoryFindByMethods.rst:33ReplyDone -
Nikita Hovratov voted on patch set 14 V +1 CR +1 03/07/23, 12:23
-
Oliver Klee voted on patch set 14 V +1 CR +1 03/07/23, 12:27
-
Benni Mack voted on patch set 14 V +1 CR +1 03/07/23, 12:31
-
Markus Klein voted on patch set 14 V +1 CR +1 03/07/23, 12:40
-
core-ci voted on patch set 14 V +1 03/07/23, 13:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38594
-
Nikita Hovratov voted on patch set 14 V +2 CR +2 03/07/23, 13:34
-
Nikita Hovratov merged patch set 15 03/07/23, 13:34