Review main Merged

86686[BUGFIX] Initialize FormEngine review module before validation takes place

Andreas Kienast CR +2 V +2 Normal +32 −31 updated 10/31/24, 11:24

Commit message

In order to solve initialization race conditions with the module
`@typo3/backend/form-engine-review`, the module is not initialized
anymore on load.
The module is now explicitly instantiated in the validation
module and gets the form element passed as constructor argument, all
before initial validation is executed.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Garvin Hicking +1
    • Oliver Hader +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Garvin Hicking +1
    • Oliver Hader +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 2330

Show 35 earlier messages
  1. Andreas Kienast uploaded patch set 1 10/22/24, 09:33

  2. core-ci voted on patch set 1 V +1 10/22/24, 09:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68359

  3. Andreas Kienast updated the commit message in patch set 2 V +1 10/22/24, 10:09

  4. Andreas Kienast commented on patch set 2 10/22/24, 10:10

    Removed 12.4, as it's not that easily solvable. Necessary refactoring is missing in 12.4.
  5. core-ci voted on patch set 2 V +1 10/22/24, 10:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68360

  1. Garvin Hicking commented on patch set 2 CR +1 V +1 10/22/24, 10:49

    🏎️
  2. Andreas Kienast uploaded patch set 3 CR +1 V +1 10/23/24, 18:57

  3. core-ci voted on patch set 3 V +1 10/23/24, 19:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68482

  4. Garvin Hicking voted on patch set 3 CR +1 V +1 10/23/24, 20:03

  5. Andreas Kienast uploaded patch set 4 CR +1 V +1 10/30/24, 09:01

  6. core-ci voted on patch set 4 V +1 10/30/24, 09:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68834

  7. Garvin Hicking voted on patch set 4 CR +1 V +1 10/30/24, 09:23

  8. Andreas Kienast uploaded patch set 5 CR +1 V +1 10/30/24, 12:05

  9. core-ci voted on patch set 5 V +1 10/30/24, 12:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68850

  10. Garvin Hicking voted on patch set 5 CR +1 V +1 10/30/24, 12:13

  11. Ayke Halder commented on patch set 5 10/30/24, 16:13

    form-engine-review.ts:27

    Maybe export as `default`? `export default class FormEngineReview {` That would make imports like this possible: `import FormEngineReview from '@typo3/backend/form-engine-review';` Or is the other syntax prefered - so no default-export? `import { FormEngineReview } from '@typo3/backend/form-engine-review';`
  12. Andreas Kienast commented on patch set 5 10/31/24, 07:09

    form-engine-review.ts:27 Reply

    I have no strong preference here. I started to switch to no-default-exports some time ago as a personal preference.
  13. Ayke Halder commented on patch set 5 10/31/24, 08:42

    form-engine-review.ts:27 Reply

    I have no preference either, but I came across some other classes where default-export is implemented. So just keep it here the way it is right now.
  14. Ayke Halder voted on patch set 5 CR +1 10/31/24, 08:57

  15. Andreas Kienast uploaded patch set 6 CR +1 V +1 10/31/24, 09:13

  16. core-ci voted on patch set 6 V +1 10/31/24, 09:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68899

  17. Oliver Hader commented on patch set 6 10/31/24, 09:29

    form-engine-validation.ts:68

    Would it be possible to keep `private function initialize` in `FormEngineReview` and call `initialize` in the constructor? Thus, it would be still invoked explicitly when creating the instance and not during like previously after loading with `export default new FormEngineReview();`
  18. Oliver Hader voted on patch set 6 CR +1 V +1 10/31/24, 09:34

  19. Andreas Kienast uploaded patch set 7 CR +1 V +1 10/31/24, 09:37

  20. Andreas Kienast commented on patch set 7 10/31/24, 09:37

    form-engine-validation.ts:68 Reply

    Sounds reasonable, I've pushed a new patch set.
  21. Oliver Hader voted on patch set 7 CR +1 V +1 10/31/24, 09:39

  22. core-ci voted on patch set 7 V +1 10/31/24, 09:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68900

  23. Garvin Hicking voted on patch set 7 CR +1 V +1 10/31/24, 09:57

  24. Andreas Kienast voted on patch set 7 CR +2 V +2 10/31/24, 10:49

  25. Andreas Kienast merged patch set 8 10/31/24, 11:24