89095[TASK] Demonstrate extbase model with constructor parameter promotion
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Georg Ringer +1
- Lina Wolf +1
-
Verified V +2 Done
- Stefan Bürk +2
- Georg Ringer +1
- Lina Wolf +1
- core-ci +1 CI
Issues 1
Files 4
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_data_mapper/Classes/Domain/Model/ConstructorPromotionExample.phpnew+229 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_data_mapper/Configuration/Extbase/Persistence/Classes.phpnew+11 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_data_mapper/Configuration/TCA/tx_testdatamapper_domain_model_constructor_promotion_example.phpnew+96 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Generic/Mapper/DataMapperTest.php+22 −0
Review log 810
-
Lina Wolf uploaded patch set 1 04/13/25, 10:08
-
core-ci voted on patch set 1 V -1 04/13/25, 10:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77672
-
Stefan Bürk uploaded patch set 2
V -104/18/25, 16:14 -
core-ci voted on patch set 2 V +1 04/18/25, 16:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77945
-
Stefan Bürk voted on patch set 2 CR +1 V +1 04/18/25, 16:52
-
Georg Ringer voted on patch set 2 CR +1 V +1 04/19/25, 05:59
-
Lina Wolf commented on patch set 2 CR +1 V +1 04/19/25, 06:02
As I only submitted a quick POC, but the changes came from Stefan Bürk rely, reviewing them. Tests work and the code looks good to me. Happy, we have tests for this. -
Lina Wolf commented on patch set 2 04/19/25, 06:04
A topic that I would still be missing is how to use valdiation in combination with constructor promotion, expecially if we are dealing with public properties and there are no getters and setters. This is probably beyond the scope of this PR -
Stefan Bürk commented on patch set 2 CR +2 V +2 04/19/25, 10:45
Reply
This should work with CPP as long as the property is correctly initalized, not sure about the annotations but with PHP Attributes this should be possible: https://review.typo3.org/c/Packages/TYPO3.CMS/+/89173 -
Stefan Bürk merged patch set 3 04/19/25, 11:01