82513[FEATURE] Add PSR-14 Event to modify loaded form definitions
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Nikita Hovratov +1
-
Verified V +2 Done
- Oli Bartsch +2
- Nikita Hovratov +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/core/Documentation/Changelog/13.0/Feature-102865-PSR-14EventForModifyingLoadedFormDefinition.rstnew+61 −0
- typo3/sysext/form/Classes/Mvc/Persistence/Event/AfterFormDefinitionLoadedEvent.php2new+50 −0
- typo3/sysext/form/Classes/Mvc/Persistence/FormPersistenceManager.php5+31 −16
- typo3/sysext/form/Tests/Unit/Mvc/Persistence/Event/AfterFormDefinitionLoadedEventTest.phpnew+69 −0
- typo3/sysext/form/Tests/Unit/Mvc/Persistence/FormPersistenceManagerTest.php+49 −6
Review log 1215
-
Oli Bartsch uploaded patch set 1 01/18/24, 14:43
-
core-ci voted on patch set 1 V +1 01/18/24, 14:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51763
-
Oli Bartsch uploaded patch set 2
V +101/18/24, 15:03 -
core-ci voted on patch set 2 V +1 01/18/24, 15:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51766
-
Daniel Goerz commented on patch set 2 01/18/24, 16:21
FormPersistenceManager.php:142Wouldn't it be better to apply the overrides before setting the runtime cache, so that the overrides do not need to be applied multiple times? -
Oli Bartsch commented on patch set 2 01/18/24, 20:25
AfterFormDefinitionLoadedEvent.php:28ReplyMe neither. However, IMO the more information we can provide the better.FormPersistenceManager.php:142ReplyI actually don’t want to change the existing logic. There might be good reasons for applying possible overrides after caching. I think of TypoScript conditions etc. -
Daniel Goerz commented on patch set 2 01/19/24, 10:38
FormPersistenceManager.php:142ReplyBit it is a RUNTIME cache -
Oli Bartsch commented on patch set 2 01/19/24, 10:53
FormPersistenceManager.php:142ReplyMaybe I'm overlooking sth. but since the cache key does not consider the overrides, this would not work. -
Daniel Goerz commented on patch set 2 01/19/24, 12:56
FormPersistenceManager.php:142ReplySorry, I cant follow what you mean by that. I'd suggest to remove the override from line 119 und just do it before the resulting array is runtime-cached in line 140. If you insist on not doing that, thats also fine with me, just what I stumbled upon when reading the code. -
Benni Mack voted on patch set 2 CR +1 V +1 01/24/24, 11:18
-
Nikita Hovratov uploaded patch set 3
CR +1V +101/24/24, 17:23 -
Nikita Hovratov voted on patch set 3 CR +1 V +1 01/24/24, 17:25
-
core-ci voted on patch set 3 V +1 01/24/24, 17:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52103
-
Oli Bartsch voted on patch set 3 CR +2 V +2 01/24/24, 18:35
-
Oli Bartsch merged patch set 4 01/24/24, 18:35
AfterFormDefinitionLoadedEvent.php:28