93529[BUGFIX] Correctly merge components and viewhelper XSD
Commit message
Review
-
Code review CR +2 Done
- Simon Praetorius +2
- Alexander Grein +1
- Christian Kuhn +1
-
Verified V +2 Done
- Simon Praetorius +2
- Alexander Grein +1
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 2
Review log 1519
-
Simon Praetorius uploaded patch set 1 04/02/26, 14:24
-
core-ci voted on patch set 1 V +1 04/02/26, 14:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99503
-
Josua Vogel voted on patch set 1 CR +1 V +1 04/03/26, 06:37
-
Simon Praetorius commented on patch set 1 V -1 04/07/26, 07:34
According to @alexander.grein@gmail.com, this doesn't address all the issues. Probably needs unit tests for the merging now... -
Simon Praetorius uploaded patch set 2
CR +1V +104/07/26, 15:06 -
Simon Praetorius commented on patch set 2 04/07/26, 15:09
SchemaCommand.php:160before: `$viewHelper->name` after: `$viewHelper->tagName` Otherwise just renamed variables. -
Simon Praetorius commented on patch set 2 04/07/26, 15:09
SchemaCommand.php:160ReplyDone -
core-ci voted on patch set 2 V -1 04/07/26, 15:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99707
-
Simon Praetorius uploaded patch set 3
V -104/07/26, 16:10 -
core-ci voted on patch set 3 V -1 04/07/26, 16:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99708
-
core-ci voted on patch set 3 V +1 04/07/26, 17:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99708
-
Alexander Grein commented on patch set 3 CR +1 V +1 04/08/26, 10:53
It works, but it needs to use the component NS inside component templates to get code assistant for both (viewhelpers and components). This is okay, but may be worth to documentate. Example: <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:mail="http://typo3.org/ns/VENDOR/Extension/Components/ComponentCollection" data-namespace-typo3-fluid="true"> -
Simon Praetorius commented on patch set 3 04/08/26, 10:59
Reply
Thanks for testing! I think there is not (yet) a chapter about namespace in TYPO3 Explained, but it's documented in Fluid Standalone: https://docs.typo3.org/other/typo3fluid/fluid/main/en-us/ViewHelpers/SchemaFiles.html > Some IDEs support the mapping of such XSD schemas to XML namespace URLs (xmlns="...") which you can include in Fluid templates. -
Ayke Halder commented on patch set 3 04/08/26, 15:28
The exact logic here is hidden for me. Please check by yourself if the mentioned points need further adjustements or are just fine as-is.SchemaCommand.php:126Might get totally overridden below - see comment below. Is it actually necessary to start filling ` $viewHelperNamespaces` here?SchemaCommand.php:152Why is the xml namespace always taken from the view-helper that is the first entry of the array? Maybe add a comment into the code, that gives a hint.SchemaCommand.php:157This removes any existing entry which might have been already set at the top of this function. Is this by design, feature or bug? -
Simon Praetorius commented on patch set 3 04/08/26, 16:00
Reply
Thanks for looking into it more thoroughly. I agree that the code could be improved. However, I'd like to stick to the bugfix in this patch. I only moved the code around to be able to add tests, there have been no meaningful changes apart from the actual bugfix. I just re-checked this via diff: The only changes are variable names and the actual bugfix.SchemaCommand.php:126ReplyIn most cases, the result of the first foreach will be the final result. Only if global namespaces with more than one entry get involved, the initial result gets thrown away.SchemaCommand.php:152ReplyI'd have to look into it. That part of the code didn't change.SchemaCommand.php:157Replyby design, see other comment. -
Christian Kuhn voted on patch set 3 CR +1 V +1 04/08/26, 16:27
-
Simon Praetorius commented on patch set 3 CR +2 V +2 04/08/26, 16:54
I will leave the comments open and try to address them in a follow-up if I find the time. -
Simon Praetorius merged patch set 4 04/08/26, 16:54
-
Simon Praetorius commented on patch set 4 04/08/26, 17:44
Reply
I made an attempt to simplify it, but I'm not sure if I was successful. This is just a bit complicated overall because this whole namespace merging construct was established a long time ago and has some problems in itself. https://review.typo3.org/c/Packages/TYPO3.CMS/+/93571SchemaCommand.php:126ReplyDoneSchemaCommand.php:152ReplyDoneSchemaCommand.php:157ReplyDone