74364[BUGFIX] Name invalid identifier in UpgradeWizard exception
Commit message
Review
-
Code review CR +2 Done
- Helmut Hummel +2
- Oliver Klee +1
- Stefan Bürk +1
- Nikita Hovratov +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Helmut Hummel +2
- Stefan Bürk +1
- Nikita Hovratov +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 1
Review log 3139
Show 1014 earlier messages
-
J. Peter M. Schuler uploaded patch set 1 04/20/22, 20:36
-
Oliver Klee voted on patch set 1 CR +1 04/20/22, 20:44
-
Stefan Bürk commented on patch set 1 04/20/22, 20:47
Thanks for this patch. Left some minor remarks.Would handle this more as a bugfix than a simple task. Any maybe we can make the line a little bit smaller. Would would you say to: ``` [BUGFIX] Name invalid identifier in UpdateWizard exception ```Not a "priority/security" bugfix, also helpful. So normaly no candidate for v10 anymore.UpgradeWizardsService.php:469Displaying empty $identifer seems kind of contra-productive. If empty should be rephrased to "no identifer given" or something like that. In the end, if given but invalid it's really good to display it. -
J. Peter M. Schuler uploaded patch set 2 04/20/22, 20:47
-
J. Peter M. Schuler updated the commit message in patch set 3 04/20/22, 20:49
-
core-ci voted on patch set 1 V -1 04/20/22, 20:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26250
-
core-ci voted on patch set 2 V +1 04/20/22, 20:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26251
-
core-ci voted on patch set 3 V +1 04/20/22, 21:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26252
-
Oliver Klee voted on patch set 3 CR +1 04/20/22, 21:28
-
Jonas Eberle commented on patch set 3 04/21/22, 06:08
UpgradeWizardsService.php:469ReplyI also think that while we are at it we could mention which of the cases was not satisfied to provide more helpful Exception texts. -
Mathias Brodala commented on patch set 3 04/21/22, 06:50
UpgradeWizardsService.php:469This should be split into three checks with separate exceptions: > Empty wizard identifier given And: > Wizard identifier "%s" not found in $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] The latter also gives a hint where to look for the errors. And: > Wizard identifier "%s" does not implement the RowUpdaterInterface -
J. Peter M. Schuler uploaded patch set 4 04/21/22, 13:13
-
core-ci voted on patch set 4 V +1 04/21/22, 13:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26271
-
Mathias Brodala commented on patch set 4 CR -1 04/21/22, 13:24
UpgradeWizardsService.php:477and
-
Oli Bartsch commented on patch set 4 CR -1 04/21/22, 20:38
UpgradeWizardsService.php:469Since we changed the message, let's use a new code here as well.UpgradeWizardsService.php:473Should be || However, as Mathias suggested, we should split this as well, having dedicated exceptions. -
J. Peter M. Schuler uploaded patch set 5 04/21/22, 22:26
-
J. Peter M. Schuler commented on patch set 5 04/21/22, 22:27
Reply
DoneReply
DoneUpgradeWizardsService.php:469ReplyI'd myself rather not touch that, as I don't know if it then should have the same exception ID for backwards compatibility, or get a new unique ID and then which gets the new one (while loosing the wiki knowledge for the ID). (as the wiki has no entry this concern is irrelevant). Additionally having empty quotes will make it clear it was empty string and probably this scenario is only valid for admins and maintainers anyways, so my humble mind sees no deterioration, although I get there is much potential for further improvement.UpgradeWizardsService.php:469ReplyAck and done. (Except the last two are <not>&&<not>, so it is still one exception, as one needs to do at least one, but can only do one).UpgradeWizardsService.php:469ReplyDoneUpgradeWizardsService.php:473ReplyCould anybody explain why it should be an OR? it was always an AND. And the AND makes sense, as it might be meaningful to have an identifier which isn't the class name. I always thought the is_subclass_of was either a fallback to catch broken registration or a auto detection thing to avoid that old TYPO3_CONF_VARS.UpgradeWizardsService.php:477ReplyThe exception says "not X && not Y => throw exception", so if either is true, it won't throw an exception. I'm not saying if or if not the if is correct semantically, but "my" exception text matches the condition. -
core-ci voted on patch set 5 V -1 04/21/22, 22:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26289
-
Mathias Brodala commented on patch set 5 04/22/22, 06:45
UpgradeWizardsService.php:473ReplyAs one can see even these two lines already have too much complexity, especially since there are two completely unrelated things checked together. So by all means, let's split this into two checks. Having a changed code here for one of the two errors should not be a deal-breaker. -
Mathias Brodala commented on patch set 5 04/22/22, 11:21
UpgradeWizardsService.php:473ReplyAfter some further discussion I finally understand the condition. A valid identifier is: 1. not empty 2. registered OR implements RowUpdaterInterface See https://review.typo3.org/c/Packages/TYPO3.CMS/+/59290/ -
Stefan Bürk commented on patch set 5 CR -1 04/22/22, 17:44
on it .. -
J. Peter M. Schuler commented on patch set 5 04/22/22, 17:46
UpgradeWizardsService.php:473ReplyFor documentation of background-discussion: https://github.com/TYPO3/typo3/commit/3b84e6139f2c9e0465ac3d9711f72398ee48f796 introduced this condition. This condition lets RowUpdaters exist which aren't "real" update wizards. -
core-ci voted on patch set 5 V +1 04/22/22, 18:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26289
-
Stefan Bürk commented on patch set 5 V +1 CR +1 04/22/22, 18:06
core-ci -1 was a hickup. no real issue. Retried pipeline. (Sry for this, but tackling these ssl issue is not quite easy - we are aware of it and working on it).UpgradeWizardsService.php:473ReplyOkay, to clear here some things up: 1. @Oliver: nope, && is here correct. This is a negated check to state this if $identifier is not registered properly AND not a RowUpdater. Thus the && check is correct and needed. 2. @Brodala: I would not split this - as splitting means to have for each splitted part more complex conditions. This one is quite quite fine. 3. Using "or" in the expection message is correct, despite the && in the condition Generally this is straight forwared - maybe through some thinking around the corner some confussion popped up - and was not my indent with the first "lets handly an empty identifier" comment. So splitting out the "empty" one is quite the correct way, with a dedicated exception code (which has to be unique through core policies). After checking the patch out, reading all the comments - the patch now is in the correct form.UpgradeWizardsService.php:477ReplyAbsolutly right Peter. "or" is absolutly correct here. -
Nikita Hovratov commented on patch set 5 CR -1 04/22/22, 18:32
On it -
Stefan Bürk wrote 04/22/22, 18:36
Removed Code-Review+1 by Stefan Bürk -
Stefan Bürk wrote 04/22/22, 18:36
Removed Verified+1 by Stefan Bürk -
Nikita Hovratov uploaded patch set 6 04/22/22, 18:45
-
Nikita Hovratov commented on patch set 6 V +1 CR +1 04/22/22, 18:46
Patch was fine, just added some cosmetics. -
Stefan Bürk updated the commit message in patch set 7 04/22/22, 18:54
-
Stefan Bürk voted on patch set 7 V +1 CR +1 04/22/22, 18:54
-
Nikita Hovratov voted on patch set 7 V +1 CR +1 04/22/22, 18:55
-
core-ci voted on patch set 6 V +1 04/22/22, 18:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26316
-
core-ci voted on patch set 7 V +1 04/22/22, 19:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26317
-
Oliver Klee voted on patch set 7 CR +1 04/22/22, 19:06
-
Simon Schaufelberger voted on patch set 7 V +1 CR +1 04/23/22, 15:19
-
Helmut Hummel voted on patch set 7 V +2 CR +2 04/23/22, 17:37
-
Helmut Hummel merged patch set 8 04/23/22, 17:37