92839[TASK] Separate compiling and asset handling concerns of FormEngine
Commit message
Review
-
Code review CR +2 Done
- Georg Ringer +2
- Benni Mack +1
-
Verified V +2 Done
- Georg Ringer +2
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 10
- Build/Sources/TypeScript/backend/form-engine.ts3+1 −1
- typo3/sysext/backend/Classes/Controller/EditDocumentController.php9+26 −33
- typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php+8 −7
- typo3/sysext/backend/Classes/Form/FormResult.php5new+36 −0
- typo3/sysext/backend/Classes/Form/FormResultCollection.php11new+133 −0
- typo3/sysext/backend/Classes/Form/FormResultCompiler.php2deleted+0 −164
- typo3/sysext/backend/Classes/Form/FormResultFactory.phpnew+56 −0
- typo3/sysext/backend/Classes/Form/FormResultHandler.php9new+78 −0
- typo3/sysext/backend/Resources/Public/JavaScript/form-engine.js+2 −2
- typo3/sysext/filelist/Classes/Controller/File/EditFileController.php+7 −5
Review log 67101
Show 5176 earlier messages
-
Andreas Nedbal uploaded patch set 1 02/13/26, 15:54
-
core-ci voted on patch set 1 V -1 02/13/26, 16:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95840
-
Stefan Bürk commented on patch set 1 02/13/26, 16:08
-
Andreas Nedbal commented on patch set 1 02/13/26, 16:17
FormResult.php:20ReplyAck on `final readonly`! Looking at all previous usages and the future use case of the result, there were no cases that require later manipulation. Or, there was one, in EditDocumentController->makeEditForm where a hidden field with a PID was appended to the forms HTML. I adjusted the approach to adding this hidden field to `additionalHiddenFields` before compiling. Otherwise I would have made the HTML property mutable probably. -
Benjamin Kott commented on patch set 1 02/14/26, 07:42
EditDocumentController.php:2096this feels wrong, this is not really something that should be merged? each form result should stay for it´s own and we should provde a FormResultCollection or something to access the merged values. -
Andreas Nedbal rebased onto patch set 2
V -102/16/26, 14:54 -
core-ci voted on patch set 2 V -1 02/16/26, 15:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95969
-
Andreas Nedbal rebased onto patch set 3
V -102/17/26, 12:32The following files contain Git conflicts: * typo3/sysext/backend/Classes/Form/FormResultCompiler.php -
Andreas Nedbal uploaded patch set 4 02/17/26, 12:59
-
Andreas Nedbal rebased onto patch set 5 02/17/26, 12:59
The following files contain Git conflicts: * typo3/sysext/backend/Classes/Form/FormResultCompiler.php -
Andreas Nedbal uploaded patch set 6 02/17/26, 13:01
-
Andreas Nedbal marked it ready for review 02/17/26, 13:01
-
Andreas Nedbal uploaded patch set 7 02/17/26, 13:06
-
Andreas Nedbal uploaded patch set 8 02/17/26, 13:16
-
core-ci voted on patch set 4 V -1 02/17/26, 13:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96044
-
Andreas Nedbal uploaded patch set 9 02/17/26, 13:27
-
core-ci voted on patch set 3 V -1 02/17/26, 13:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96040
-
core-ci voted on patch set 7 V -1 02/17/26, 13:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96049
-
core-ci voted on patch set 6 V -1 02/17/26, 13:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96046
-
core-ci voted on patch set 8 V -1 02/17/26, 13:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96052
-
core-ci voted on patch set 5 V -1 02/17/26, 13:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96045
-
core-ci voted on patch set 9 V -1 02/17/26, 14:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96057
-
Andreas Nedbal uploaded patch set 10
V -102/17/26, 14:26 -
core-ci voted on patch set 10 V +1 02/17/26, 14:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96060
-
Andreas Nedbal commented on patch set 10 02/17/26, 14:38
EditDocumentController.php:2096ReplyDoneFormResult.php:20ReplyDone -
Tobias Wojtylak commented on patch set 10 02/18/26, 07:48
Looks good! It would be great to include some tests to cover this.FormResultCollection.php:62not sure if we should use phpdoc for the return value. E.g. ``` /** * @return string[] */ ``` but maybe the IDE is smart enough?FormResultCollection.php:64maybe we can avoid in_array in the loop (for every file): e.g. ``` $files = []; foreach ($this->results as $result) { foreach ($result->stylesheetFiles as $file) { $files[$file] = true; } } return array_keys($files); ```FormResultHandler.php:81Is it possible to inject the service instead of using GLOBALS? -
Oli Bartsch commented on patch set 10 02/18/26, 08:04
Could you please specify use cases for the new FormResult which are not leading to the result being passed to the PageRenderer?EditDocumentController.php:198What about injecting a `FormResultHandlerInterface`? This came to my mind when thinking about the use cases I've mentioned in the comment in the commit message.EditDocumentController.php:312So when using an interface this might become just `addAssets()`. Depending on the implementation, this might use PageRenderer, or not.EditDocumentController.php:328Maybe `getHiddenFieldsMarkup()` or `getHiddenFieldsHtml()`?FormResult.php:23Why can this be nullable? I think if we construct a FormResult without any meaningful markup, this place needs special handling anyways. Can also not see a case in the current patch, which might lead to passing null here.FormResultCompiler.php:62I think those null checks can be omitted. See `initializeResultArray()`. If anything is null here, there is another issue in the code which should not be hidden. -
Andreas Nedbal uploaded patch set 11
V +102/18/26, 12:33 -
Andreas Nedbal commented on patch set 11 02/18/26, 12:36
EditDocumentController.php:198ReplyDoneEditDocumentController.php:312ReplyIf we make it an interface I'd rather go for "handle" (that's what a Handler does), so I went with that.EditDocumentController.php:328ReplyI personally think that just calling it getHiddenFields is fine, we don't really have another representation for them, so just assuming it's the markup by default should be alright?FormResult.php:23ReplyDoneFormResultCollection.php:62ReplyDoneFormResultCollection.php:64ReplyDoneFormResultCompiler.php:62ReplyDoneFormResultHandler.php:81Reply> argument "$languageService" of method "__construct()" needs an instance of "TYPO3\CMS\Core\Localization\LanguageService" but this type has been excluded in "Configuration/Services.yaml". It can't. -
Andreas Nedbal updated the commit message in patch set 12 02/18/26, 12:38
-
Andreas Nedbal commented on patch set 12 02/18/26, 12:38
Reply
Done -
core-ci voted on patch set 11 V -1 02/18/26, 13:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96132
-
Andreas Nedbal rebased onto patch set 13 02/18/26, 13:13
-
core-ci voted on patch set 12 V -1 02/18/26, 13:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96134
-
core-ci voted on patch set 13 V -1 02/18/26, 13:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96137
-
Andreas Nedbal uploaded patch set 14
V -102/18/26, 15:19 -
core-ci voted on patch set 14 V -1 02/18/26, 15:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96160
-
Tobias Wojtylak commented on patch set 14 02/18/26, 16:44
FormResultCollection.php:77Do we need array_unique() here?FormResultCollection.php:131If multiple saveFieldNames are defined, should the class really return only the last one in the sequence? Or can this not occur at all? -
Andreas Nedbal uploaded patch set 15
V -102/19/26, 10:33 -
core-ci voted on patch set 15 V -1 02/19/26, 10:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96230
-
Andreas Nedbal uploaded patch set 16
V -102/19/26, 10:54 -
Andreas Nedbal commented on patch set 15 02/19/26, 11:00
FormResultCollection.php:77ReplyDoneFormResultCollection.php:131ReplyThere only is either one or none used at all, the loop in makeEditForm sets it for all form results though. So, taking the first one or the last one is just a choice of preference. (I think leaving the full loop is fine to because there will never be that many FormResults that this will impact performance in any meaningful way) -
core-ci voted on patch set 16 V +1 02/19/26, 11:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96234
-
Andreas Nedbal commented on patch set 16 02/19/26, 14:18
FormResultCollection.php:131ReplyDone -
Andreas Nedbal uploaded patch set 17
V +102/19/26, 14:58 -
core-ci voted on patch set 17 V +1 02/19/26, 15:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96260
-
Andreas Nedbal commented on patch set 17 02/19/26, 15:13
EditDocumentController.php:328ReplyDone -
Andreas Nedbal uploaded patch set 18
V +102/19/26, 15:57 -
core-ci voted on patch set 18 V +1 02/19/26, 16:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96264
-
Benjamin Kott commented on patch set 18 02/19/26, 22:12
FormResultHandler.php:79we still have the inline labels here and also the inline settings for the date config, i thought we are going to extract them in a prepatch? -
Benjamin Kott commented on patch set 18 02/20/26, 00:10
FormResultCollection.php:138I would really like to see this gone for good. 92910: [TASK] Remove doSave hidden field from FormEngine | https://review.typo3.org/c/Packages/TYPO3.CMS/+/92910 -
Benjamin Kott commented on patch set 18 02/20/26, 00:14
FormResultHandler.php:55we should get rid of this inline setting as well, we are already invoking the form-engine below.FormResultHandlerInterface.php:20would like to prefer no interface here, as we are probably not planning to make this exchangeable. -
Oli Bartsch commented on patch set 18 02/20/26, 08:08
FormResultHandlerInterface.php:20ReplyThis was based on my comment. When reading the commit message `This is impractical for purposes where FormEngine markup and required assets need to be handled separately, or by something completely unrelated to PageRenderer.` it suggests, form engine assets can be added / rendered by any component not just via PageRenderer. If we would not make this exchangeable, I see no benefit in extracting this at all. -
Andreas Nedbal uploaded patch set 19
V +102/20/26, 13:46 -
Andreas Nedbal commented on patch set 19 02/20/26, 13:50
FormResultHandler.php:55ReplyDone, I guess? I just added `editform` into the TypeScript here and made the override using `TYPO3.settings.FormEngine.formName` still work.FormResultHandler.php:79ReplyThe labels will still be handled in pre-patches. I moved the DateConfiguration into ModuleTemplate in this patch here (there was no other "generic" location that I could think of, I take suggestions here though)FormResultHandlerInterface.php:20ReplyDone -
core-ci voted on patch set 19 V -1 02/20/26, 13:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96355
-
Andreas Nedbal uploaded patch set 20
V -102/20/26, 13:59 -
core-ci voted on patch set 20 V +1 02/20/26, 14:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96358
-
Benjamin Franzke commented on patch set 20 02/23/26, 07:40
ModuleTemplate.php:170Do you know why you needed this? The JS code reads this config from `top.` (not nice, but helpful to not require it to be set here), see https://github.com/TYPO3/typo3/blob/d827863e059f01194370e3a0a88bc1f8e071930e/Build/Sources/TypeScript/backend/element/datetime-element.ts#L260 -
Andreas Nedbal rebased onto patch set 21
V +102/23/26, 15:13The following files contain Git conflicts: * typo3/sysext/backend/Classes/Controller/EditDocumentController.php * typo3/sysext/backend/Classes/Form/FormResultCompiler.php * typo3/sysext/backend/Resources/Public/JavaScript/form-engine.js -
Andreas Nedbal uploaded patch set 22 02/23/26, 15:25
-
Andreas Nedbal marked it ready for review 02/23/26, 15:25
-
core-ci voted on patch set 22 V +1 02/23/26, 15:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96594
-
Andreas Nedbal commented on patch set 22 02/23/26, 15:42
FormResultCollection.php:138ReplyDone -
Andreas Nedbal uploaded patch set 23
V +102/23/26, 15:54 -
Andreas Nedbal uploaded patch set 24 02/23/26, 15:54
-
Andreas Nedbal commented on patch set 24 02/23/26, 15:56
ModuleTemplate.php:170ReplyRemove this, as the same configuration is set in BackendController (which also explains the config check in `top.` which is already present in JS) -
core-ci voted on patch set 23 V +1 02/23/26, 16:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96599
-
core-ci voted on patch set 24 V +1 02/23/26, 16:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96600
-
core-ci voted on patch set 21 V -1 02/23/26, 16:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96592
-
Benjamin Kott commented on patch set 24 02/23/26, 16:50
form-engine.ts:165cannot it just be set to editform? do we set it anywhere? -
Andreas Nedbal rebased onto patch set 25
V +102/24/26, 09:05The following files contain Git conflicts: * typo3/sysext/backend/Resources/Public/JavaScript/form-engine.js -
Andreas Nedbal uploaded patch set 26 02/24/26, 09:31
-
Andreas Nedbal marked it ready for review 02/24/26, 09:31
-
core-ci voted on patch set 26 V +1 02/24/26, 09:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96691
-
Andreas Nedbal uploaded patch set 27
V +102/24/26, 09:53
-
core-ci voted on patch set 25 V -1 02/24/26, 10:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96687
-
core-ci voted on patch set 27 V +1 02/24/26, 10:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96695
-
Andreas Nedbal rebased onto patch set 28
V +102/24/26, 10:40The following files contain Git conflicts: * typo3/sysext/backend/Resources/Public/JavaScript/form-engine.js -
Andreas Nedbal uploaded patch set 29 02/24/26, 10:43
-
Andreas Nedbal marked it ready for review 02/24/26, 10:44
-
Andreas Nedbal uploaded patch set 30 02/24/26, 10:58
-
Andreas Nedbal commented on patch set 30 02/24/26, 11:01
form-engine.ts:165ReplyDoneFormResultHandler.php:79ReplyThe label file additions have now been removed as all lll/TYPO3.lang usages have been taken care of. -
core-ci voted on patch set 29 V -1 02/24/26, 11:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96703
-
Simon Schaufelberger commented on patch set 30 02/24/26, 11:06
FormResultHandler.php:29Since the FormResultCompiler is internal, make this internal as well? -
Andreas Nedbal uploaded patch set 31 02/24/26, 11:11
-
Andreas Nedbal commented on patch set 31 02/24/26, 11:11
FormResultHandler.php:29ReplyDone -
core-ci voted on patch set 28 V -1 02/24/26, 11:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96702
-
core-ci voted on patch set 30 V -1 02/24/26, 11:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96708
-
core-ci voted on patch set 31 V -1 02/24/26, 12:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96712
-
Andreas Nedbal uploaded patch set 32
V -102/24/26, 12:25 -
core-ci voted on patch set 32 V +1 02/24/26, 12:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96728
-
Benjamin Franzke uploaded patch set 33
V +102/24/26, 13:15 -
Benjamin Franzke commented on patch set 33 02/24/26, 13:15
form-engine.ts:165I (think) the idea was to remove the setting from `TYPO3.settings`, we can keep the constant in here. Done. -
core-ci voted on patch set 33 V +1 02/24/26, 14:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96737
-
Benni Mack commented on patch set 33 CR -1 02/24/26, 15:42
this looks good, I will go over it and give some minor final things to it. -
Benni Mack uploaded patch set 34
CR -1V +102/24/26, 16:53 -
Benni Mack voted on patch set 34 CR +1 V +1 02/24/26, 16:53
-
core-ci voted on patch set 34 V +1 02/24/26, 17:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96771
-
Georg Ringer voted on patch set 34 CR +2 V +2 02/24/26, 19:45
-
Georg Ringer merged patch set 35 02/24/26, 19:45
FormResult.php:20