73987[!!!][TASK] Add modern typing to ClassNamingUtility
Commit message
Review
-
Code review CR +2 Done
- Andreas Kienast +2
- Georg Ringer +1
- Oliver Klee +1
- Simon Gilli +1
- Stefan Bürk +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Andreas Kienast +2
- Georg Ringer +1
- Stefan Bürk +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 2
Files 2
Review log 4655
Show 2530 earlier messages
-
crell uploaded patch set 1 03/17/22, 20:14
-
core-ci voted on patch set 1 V +1 03/17/22, 20:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24970
-
Oli Bartsch commented on patch set 1 V -1 03/17/22, 21:44
Adding type hints to parameters of API methods is a breaking change which has to be documented as such. -
crell uploaded patch set 2 03/29/22, 18:19
-
core-ci voted on patch set 2 V +1 03/29/22, 18:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25266
-
Oliver Klee voted on patch set 2 CR +1 03/29/22, 18:50
-
Stefan Bürk uploaded patch set 3 03/29/22, 23:31
-
core-ci voted on patch set 3 V +1 03/29/22, 23:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25275
-
Stefan Bürk voted on patch set 3 V +1 CR +1 03/29/22, 23:59
-
crell commented on patch set 3 03/30/22, 01:29
ClassNamingUtility.php:67If we're going to mess with the code here, I'd go all the way to a ternary, frankly. :-) (Multiline ternaries are a very useful construct for this sort of case.) -
Simon Schaufelberger commented on patch set 3 03/30/22, 15:41
ClassNamingUtility.php:67Replywould make sense to me imho -
Stefan Bürk commented on patch set 3 03/30/22, 15:43
ClassNamingUtility.php:67ReplyThe point is, that I wanted a classic "default -> if condition then" instead if a if-then-else. Do not have something against multiline ternaries, personally. But had not the best luck with it in other patches - thus using this one. Personally I'm fine with both, still preferred here that construct because of method call as condition. -
Oliver Klee commented on patch set 3 03/30/22, 15:48
ClassNamingUtility.php:67ReplyI personally find nested ternaries really hard to read and to understand and would recommend against using them. (Better let's have very clear, slightly longer code than very "clever", but hard to (mis)read code.) -
crell commented on patch set 3 03/30/22, 15:54
ClassNamingUtility.php:67ReplyNo nesting involved. I agree, nested ternaries are nasty. I mean this: $extensionName = str_starts_with($controllerObjectName, 'TYPO3\\CMS') ? $extensionName = '^(?P<vendorName>[^\\\\]+\\\[^\\\\]+)\\\(?P<extensionName>[^\\\\]+)' : '^(?P<vendorName>[^\\\\]+)\\\\(?P<extensionName>[^\\\\]+)'; Which avoids multiple assignments to the same variable, but also only has one assignment statement overall. It's basically a shortened version of match(), in practice. It's logically identical to the current code. (I'd have left the original code in place to avoid scope creeping here, but as long as we're messing with it, let's go for the cleanest option.) -
Stefan Bürk commented on patch set 3 03/30/22, 15:58
ClassNamingUtility.php:67Replygo for it (just remove $extensName in the if-line (from my side). I'm fine with both at all in that case. It's just old school kicked in to avoid else-branches ;) Having the "default" before, and only change if condition matched. As said. Fine with both from myside. Would buy both. -
crell uploaded patch set 4 03/30/22, 16:22
-
Oliver Klee commented on patch set 4 CR +1 03/30/22, 16:27
Thanks! -
crell commented on patch set 3 03/30/22, 16:30
ClassNamingUtility.php:67ReplyAck -
core-ci voted on patch set 4 V +1 03/30/22, 16:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25292
-
Stefan Bürk voted on patch set 4 V +1 CR +1 03/30/22, 16:40
-
Simon Schaufelberger commented on patch set 4 03/31/22, 00:24
ClassNamingUtility.php:67this semicolon looks a bit lost here. I have never seen this code style anywhere in the core and would prefer putting it in the end of line 66 -
Simon Schaufelberger voted on patch set 4 CR -1 03/31/22, 00:27
-
Simon Schaufelberger commented on patch set 4 03/31/22, 00:30
ClassNamingUtility.php:67ReplyI've checked other ternary usages in the core and the semicolon is always at the end of the line. -
Stefan Bürk uploaded patch set 5 03/31/22, 12:46
-
Stefan Bürk commented on patch set 5 V +1 CR +1 03/31/22, 12:47
ClassNamingUtility.php:67ReplyDone -
Oliver Klee voted on patch set 5 CR +1 03/31/22, 12:53
-
core-ci voted on patch set 5 V +1 03/31/22, 12:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25304
-
Simon Schaufelberger voted on patch set 5 V +1 CR +1 03/31/22, 14:29
-
crell commented on patch set 5 CR +1 03/31/22, 15:26
I've done a little of each on the ternary semicolon, so I don't care greatly either way. -
Andreas Kienast commented on patch set 5 CR -1 04/01/22, 12:34
Breaking-97210-TypesAddedToMethodSignatures.rst:17By adding your changed class you agree it's a breaking change. Please prefix such patches with [!!!].
-
Andreas Kienast updated the commit message in patch set 6 04/01/22, 12:35
-
Simon Schaufelberger voted on patch set 6 V +1 CR +1 04/01/22, 12:36
-
Stefan Bürk voted on patch set 6 V +1 CR +1 04/01/22, 12:36
-
Andreas Kienast voted on patch set 6 CR +1 04/01/22, 12:37
-
Stefan Bürk commented on patch set 6 04/01/22, 12:37
Breaking-97210-TypesAddedToMethodSignatures.rst:17Replyhuh! .. right (head against the wall) -
Oliver Klee voted on patch set 6 CR +1 04/01/22, 12:49
-
core-ci voted on patch set 6 V +1 04/01/22, 12:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25352
-
Simon Gilli commented on patch set 6 CR -1 04/01/22, 12:52
ClassNamingUtility.php:58Exact type hint is missing -
Stefan Bürk commented on patch set 6 04/01/22, 13:06
ClassNamingUtility.php:58ReplyWas not before either. Which one do you have in mind ? -
crell updated the commit message in patch set 7 04/01/22, 13:34
-
Simon Schaufelberger updated the commit message in patch set 8 04/01/22, 13:38
-
Oliver Klee voted on patch set 8 CR +1 04/01/22, 13:42
-
core-ci voted on patch set 7 V +1 04/01/22, 13:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25355
-
Simon Schaufelberger voted on patch set 8 V +1 CR +1 04/01/22, 13:44
-
core-ci voted on patch set 8 V +1 04/01/22, 13:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25356
-
crell uploaded patch set 9 04/01/22, 13:50
-
Simon Schaufelberger voted on patch set 9 V +1 CR +1 04/01/22, 13:53
-
crell commented on patch set 9 04/01/22, 13:53
ClassNamingUtility.php:58ReplyDoneBreaking-97210-TypesAddedToMethodSignatures.rst:17ReplyDone -
core-ci voted on patch set 9 V +1 04/01/22, 13:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25357
-
Oliver Klee voted on patch set 9 CR +1 04/01/22, 14:12
-
Georg Ringer voted on patch set 9 V +1 CR +1 04/02/22, 06:50
-
Simon Gilli voted on patch set 9 CR +1 04/02/22, 11:35
-
Stefan Bürk voted on patch set 9 V +1 CR +1 04/04/22, 14:52
-
Andreas Kienast voted on patch set 9 V +2 CR +2 04/04/22, 14:57
-
Andreas Kienast merged patch set 10 04/04/22, 14:57