88097[BUGFIX] TCA Schema API: Clarify default values
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Oli Bartsch +1
-
Verified V +2 Done
- Benni Mack +2
- Oli Bartsch +1
- core-ci +1 CI
Issues 1
Files 20
- typo3/sysext/core/Classes/DataHandling/DataHandler.php+4 −3
- typo3/sysext/core/Classes/Schema/Field/AbstractFieldType.php2+5 −0
- typo3/sysext/core/Classes/Schema/Field/CategoryFieldType.php+5 −0
- typo3/sysext/core/Classes/Schema/Field/CheckboxFieldType.php+5 −0
- typo3/sysext/core/Classes/Schema/Field/FieldTypeInterface.php+1 −0
- typo3/sysext/core/Classes/Schema/Field/FileFieldType.php+10 −0
- typo3/sysext/core/Classes/Schema/Field/FlexFormFieldType.php+5 −0
- typo3/sysext/core/Classes/Schema/Field/FolderFieldType.php+9 −0
- typo3/sysext/core/Classes/Schema/Field/GroupFieldType.php+5 −0
- typo3/sysext/core/Classes/Schema/Field/ImageManipulationFieldType.php+8 −0
- typo3/sysext/core/Classes/Schema/Field/InlineFieldType.php+10 −0
- typo3/sysext/core/Classes/Schema/Field/JsonFieldType.php+4 −0
- typo3/sysext/core/Classes/Schema/Field/LanguageFieldType.php+10 −0
- typo3/sysext/core/Classes/Schema/Field/NoneFieldType.php+5 −0
- typo3/sysext/core/Classes/Schema/Field/RadioFieldType.php+4 −0
- typo3/sysext/core/Classes/Schema/Field/SelectRelationFieldType.php+6 −0
- typo3/sysext/core/Classes/Schema/Field/SlugFieldType.php+14 −0
- typo3/sysext/core/Classes/Schema/Field/StaticSelectFieldType.php+6 −0
- typo3/sysext/core/Classes/Schema/Field/UuidFieldType.php+15 −0
- typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php+185 −0
Review log 2530
Show 45 earlier messages
-
Daniel Windloff uploaded patch set 1 02/08/25, 09:42
-
core-ci voted on patch set 1 V +1 02/08/25, 09:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73797
-
Daniel Windloff commented on patch set 1 02/08/25, 09:55
For main DataHandler->initializeSlugFieldsToEmptyString() could be removed as a follow up. -
Benni Mack voted on patch set 1 CR +1 V +1 02/10/25, 20:03
-
Christian Kuhn voted on patch set 1 CR +1 V +1 02/10/25, 20:40
-
Oli Bartsch voted on patch set 1 V -1 02/10/25, 21:02
-
Oli Bartsch commented on patch set 1 02/10/25, 21:06
AbstractFieldType.php:79should we do `array_key_exists` or `??` to respect NULL? -
Daniel Windloff uploaded patch set 2
CR +1V +102/13/25, 06:39 -
Daniel Windloff commented on patch set 2 02/13/25, 06:42
AbstractFieldType.php:79ReplyThank you. Fixed and added a unit test. -
core-ci voted on patch set 2 V -1 02/13/25, 06:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74097
-
Daniel Windloff uploaded patch set 3
V -102/13/25, 07:03 -
core-ci voted on patch set 3 V +1 02/13/25, 07:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74098
-
Benni Mack voted on patch set 3 CR +1 V +1 02/18/25, 15:34
-
Oli Bartsch commented on patch set 3 02/19/25, 08:15
Where exactly is this needed? I actually don't like to "invent" something which is not configured this way in TCA. -
Daniel Windloff commented on patch set 3 02/19/25, 10:34
Reply
The slug type needs a default value to create a slug. This is currently set in DataHandler->initializeSlugFieldsToEmptyString(). As this isn't an API that could be extended, I suggest moving this need for a default value to the Schema API and remove DataHandler->initializeSlugFieldsToEmptyString() afterward. As this is a breaking change, it should be a next PR. -
Fabien Udriot voted on patch set 3 CR +1 03/05/25, 10:06
-
Daniel Windloff commented on patch set 3 03/13/25, 09:03
@bo@cedev.de How to proceed here? Neither the tca of slug or uuid should have a default value, according to the docs. So the TcaMigration does not fit as far as I see. To process values in Datahandler on new records, the column must be initialized. If this does not fit in Schema API where should it be placed? -
Daniel Windloff commented on patch set 3 03/25/25, 16:00
Ping -
Daniel Windloff commented on patch set 3 05/20/25, 05:58
Are you interested in the change? Then I will resolve the merge conflict. Otherwise I would abandon it. -
Oli Bartsch commented on patch set 3 05/20/25, 09:56
Reply
Yeah sure this is still a very good improvement. I'm just still not quite sure about the static default values for slug and uuid. For example, uuid needs to be a uuid, so `''` as default is not correct, right? -
Oli Bartsch uploaded patch set 4
CR +1V +105/20/25, 09:57 -
core-ci voted on patch set 4 V +1 05/20/25, 10:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79226
-
Daniel Windloff commented on patch set 4 05/23/25, 08:04
Reply
Yes, the empty string isn't correct for itself but will be used in the processing chain. The idea was to replace the method `initializeUuidFieldsToEmptyString` by setting the default value to this empty string. The empty default value ensures that an uuid would be generated if the value is required, even if the special methods for slug and uuid will be removed from DH in the next step. The removal of initializeSlugFieldsToEmptyString and initializeUuidFieldsToEmptyString will increase performance. Furthermore, by setting these values fixed, it isn't possible to set other default values for uuid, which shouldn't be possible. -
Oli Bartsch uploaded patch set 5
V +105/23/25, 09:53 -
Oli Bartsch commented on patch set 5 CR +1 V +1 05/23/25, 09:54
Reply
Done -
Oli Bartsch commented on patch set 5 05/23/25, 09:55
Reply
Done -
Oli Bartsch commented on patch set 5 05/23/25, 09:55
Reply
Done -
core-ci voted on patch set 5 V +1 05/23/25, 09:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79417
-
Benni Mack voted on patch set 5 CR +2 V +2 05/26/25, 06:57
-
Benni Mack merged patch set 6 05/26/25, 06:57