94797[BUGFIX] Do not map value types as Extbase relations
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Garvin Hicking +1
- Jan Kornblum +1
-
Verified V +2 Done
- Stefan Bürk +2
- Oliver Klee +1
- Garvin Hicking +1
- Jan Kornblum +1
- core-ci +1 CI
Issues 1
Files 13
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/ColumnMapFactory.php3+6 −2
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Enum/AgeGroup.phpnew+26 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Person.php+24 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_person.php+18 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.sql+2 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_json_fields/Classes/Domain/Model/Example.php+28 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_json_fields/Classes/Domain/Type/JsonValue.phpnew+48 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_json_fields/Configuration/TCA/tx_testjsonfields_domain_model_example.php+17 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Generic/Mapper/Fixtures/ColumnMapFactoryEntityFixture.php+12 −1
- typo3/sysext/extbase/Tests/Functional/Persistence/Generic/Mapper/Fixtures/ColumnMapFactoryEnumFixture.phpnew+26 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Generic/Mapper/Fixtures/ColumnMapFactoryTypeFixture.phpnew+30 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Generic/Mapper/ColumnMapFactoryTest.php+62 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/NonDomainObjectPropertyPersistenceTest.phpnew+199 −0
Review log 1719
-
Garvin Hicking uploaded patch set 1 07/16/26, 10:17
-
Garvin Hicking commented on patch set 1 07/16/26, 10:21
(See https://review.typo3.org/c/Packages/TYPO3.CMS/+/91004 for another stab at this, which I only discovered due to the possible merge conflict with it) -
core-ci voted on patch set 1 V +1 07/16/26, 10:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104828
-
Jan Kornblum commented on patch set 1 CR +1 V +1 07/16/26, 14:02
It works fine for me. -
Oliver Klee voted on patch set 1 V +1 07/16/26, 21:05
-
Benni Mack commented on patch set 1 07/17/26, 07:17
ColumnMapFactory.php:137tbh, I don't know if we should consider the "Tx_Foo_Bar" edge-case -
Garvin Hicking commented on patch set 1 07/17/26, 08:23
ColumnMapFactory.php:137ReplyDid not fully check what it does. Could also be a "txsometable:4711" identity resolving? -
Benni Mack commented on patch set 1 CR +1 09/01/26, 12:51
ColumnMapFactory.php:137ReplyDone -
Stefan Bürk commented on patch set 1 CR -2 09/01/26, 12:53
Need to check something ... -
Stefan Bürk uploaded patch set 2
CR +1V +109/02/26, 20:14Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**") -
core-ci voted on patch set 2 V +1 09/02/26, 20:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107675
-
Stefan Bürk commented on patch set 2 CR +1 V +1 09/02/26, 20:41
Reply
I thought to combine that with my original approach coming from another angle (abandoned: 91004: [WIP][BUGFIX] Avoid assuming custom property type is a relation | https://review.typo3.org/c/Packages/TYPO3.CMS/+/91004) and based on the test and this approach reinvestaged the whole place. The strpbrk, as acient as it was and pushed around over time, was the "object" check for class/type properties to decide for the handling from a really really long time ago; pushed around, survived refactorings, moved again - no one touched it and my best guess is that no-one really understood the origin or the reason for it - something which come clear now. Putting all the pieces together we can a) get rid of that acient check and pattern not understood without looking long on that place, b) solve the enum and single object (CoreType, ValueObject) pattern not describing a relation in any form in one go with a simplification of the check making it more clearer for the modern days. The test coverage was already really helpfull for that, I slightly rearranged it to add tests for the other/my cases also to the chain, hopefully making that even more visible. I think that the new approach evolved from all the investigation is a really good way to go here and I'm hoping that other sees it the same way. Leaving the comment open to raise awareness, can be simply resolved when change is okay and is the final reason to block the change from being merged. -
Garvin Hicking commented on patch set 2 CR +1 V +1 09/03/26, 06:18
Reply
Thanks! That looks great. I alao looked sone more into this legacy notation and I feel confident it really is like you outlined. Resolving this. -
Oliver Klee voted on patch set 2 V +1 09/03/26, 06:50
-
Jan Kornblum voted on patch set 2 CR +1 09/03/26, 15:38
-
Jan Kornblum voted on patch set 2 V +1 09/03/26, 15:38
-
Stefan Bürk commented on patch set 2 CR -1 V +2 09/03/26, 17:28
Taking care of the backports before merging. -
Stefan Bürk voted on patch set 2 CR +2 09/03/26, 22:42
-
Stefan Bürk merged patch set 3 09/03/26, 22:42