80099[FEATURE] Let Extbase handle native enums
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Oliver Klee +1
- Benni Mack +1
-
Verified V +2 Done
- Stefan Bürk +2
- Oliver Klee +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 15
- typo3/sysext/core/Documentation/Changelog/13.0/Feature-101396-LetExtbaseHandleNativeEnums.rst3new+53 −0
- typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php3+1 −1
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php4+13 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Enum/Salutation.phpnew+25 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/Person.php+12 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_person.php+6 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.sql+1 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_data_mapper/Classes/Domain/Model/Enum/IntegerBackedEnum.phpnew+23 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_data_mapper/Classes/Domain/Model/Enum/StringBackedEnum.phpnew+23 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_data_mapper/Classes/Domain/Model/Example.php+4 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/test_data_mapper/Configuration/TCA/tx_testdatamapper_domain_model_example.php+20 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/persons.csv+5 −5
- typo3/sysext/extbase/Tests/Functional/Persistence/Generic/Mapper/DataMapperTest.php+50 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/AddTest.php+20 −0
- typo3/sysext/extbase/Tests/Functional/Persistence/QueryParserTest.php+13 −0
Review log 2938
Show 913 earlier messages
-
Alexander Schnitzler uploaded patch set 1 07/20/23, 08:04
-
Alexander Schnitzler wrote 07/20/23, 08:05
Topic set to extbase -
core-ci voted on patch set 1 V -1 07/20/23, 08:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44332
-
Alexander Schnitzler uploaded patch set 2
V -107/20/23, 10:27 -
Alexander Schnitzler marked it ready for review 07/20/23, 10:27
-
Oliver Klee updated the commit message in patch set 3 07/20/23, 10:30
-
Oliver Klee commented on patch set 3 07/20/23, 10:32
AbstractDomainObject.php:203Shorter: `!($propertyValue instanceof \UnitEnum)`DataMapper.php:266Any reason to not use `instanceof` here? -
core-ci voted on patch set 2 V +1 07/20/23, 10:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44338
-
core-ci voted on patch set 3 V +1 07/20/23, 10:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44339
-
Alexander Schnitzler commented on patch set 3 07/20/23, 10:42
AbstractDomainObject.php:203ReplyYes, shorter but less readable IMHO because it is combined with another condition. I like `!` but in this case I think comparing with `false` is easier to understand. However, I am not against using `!` here. If we want it shorter, it's fine for me.DataMapper.php:266ReplyYes, we are in the process of creating the value here. So we don't have an object already, all we have is the type and we need to create the object(enum) in question. That's why we can't use instanceof. `$propertyType` is a FQCN here. -
Oliver Klee commented on patch set 4
V +107/20/23, 10:44Published edit on patch set 3. -
Oliver Klee commented on patch set 4 V +1 CR +1 07/20/23, 10:44
AbstractDomainObject.php:203ReplyDoneDataMapper.php:266ReplyAck -
core-ci voted on patch set 4 V +1 07/20/23, 10:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44340
-
Alexander Schnitzler commented on patch set 4 V -1 07/20/23, 11:12
I thought about this for a while and I think we need tests here for saving an entity with enum to the database. That's currently not handled at all. -
Alexander Schnitzler uploaded patch set 5
CR +1V +107/20/23, 12:36 -
Oliver Klee voted on patch set 5 V +1 CR +1 07/20/23, 12:41
-
core-ci voted on patch set 5 V -1 07/20/23, 12:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44344
-
Oliver Klee voted on patch set 5 CR 0 07/20/23, 13:06
-
Alexander Schnitzler uploaded patch set 6
V +107/20/23, 13:16 -
core-ci voted on patch set 6 V +1 07/20/23, 13:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44345
-
Oliver Klee commented on patch set 7
V +107/20/23, 13:33Published edit on patch set 6. -
Oliver Klee voted on patch set 7 V +1 CR +1 07/20/23, 13:33
-
core-ci voted on patch set 7 V +1 07/20/23, 13:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44346
-
Alexander Schnitzler uploaded patch set 8
CR +1V +107/24/23, 06:43 -
core-ci voted on patch set 8 V -1 07/24/23, 06:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44453
-
Oliver Klee commented on patch set 8 07/24/23, 20:17
This change probably will allow https://review.typo3.org/c/Packages/TYPO3.CMS/+/79513 to continue. Is there any way others can help with this change here? -
Alexander Schnitzler commented on patch set 8 07/25/23, 05:40
Reply
No, nothing to help with at the moment. I will take care during the week. -
Alexander Schnitzler uploaded patch set 9
V -107/25/23, 05:55 -
core-ci voted on patch set 9 V +1 07/25/23, 06:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44492
-
Alexander Schnitzler marked it ready for review 07/25/23, 06:03
-
Alexander Schnitzler commented on patch set 9 07/25/23, 06:04
DataMapper.php:267Having that many method params isn't ideal but we can work on that later. -
Benni Mack voted on patch set 9 V +1 CR +1 07/25/23, 06:22
-
Oliver Klee voted on patch set 9 V +1 07/25/23, 07:44
-
Oliver Klee voted on patch set 9 CR +1 07/25/23, 07:45
-
Stefan Bürk commented on patch set 9 V +1 07/25/23, 20:15
Feature-101396-LetExtbaseHandleNativeEnums.rst:16Should we somehow emphasize that only BackedEnums are supported ? as a note block/info block ? -
Alexander Schnitzler commented on patch set 9 07/26/23, 12:46
Feature-101396-LetExtbaseHandleNativeEnums.rst:16ReplyI wonder how people might think regular enums are implemented if we store a value in the database but we don't have a value in the php implementation. Maybe if people confuse cases with values? I am not against it but I don't see a need to be honest. Maybe I lack some knowledge or imagination here though. -
Stefan Bürk commented on patch set 9 V +2 CR +2 07/26/23, 13:15
Feature-101396-LetExtbaseHandleNativeEnums.rst:16ReplyWe will add it when the first question rises in the cms channel or on slack than. -
Stefan Bürk merged patch set 10 07/26/23, 13:15