Review main Abandoned

85051[TASK] Ensure system fields in TCA Schema are added

Benni Mack CR 0 V 0 Hard +211 −97 updated 07/05/24, 22:19

Commit message

Some system fields might not be configured in the
"columns" section, but might be defined in TCA[ctrl]
section.

Until now, TCA Schema could not deal with this, but
they are now added to the schema and their subschemata.

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 8

Review log 1214

  1. Benni Mack uploaded patch set 1 07/01/24, 19:28

  2. core-ci voted on patch set 1 V +1 07/01/24, 19:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60790

  3. Benni Mack updated the commit message in patch set 2 V +1 07/01/24, 19:41

  4. core-ci voted on patch set 2 V +1 07/01/24, 19:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60791

  5. Stefan Bürk voted on patch set 2 CR -1 07/01/24, 21:04

  6. Stefan Bürk commented on patch set 2 CR +1 V +1 07/01/24, 21:16

    Thanks Benni !
  7. Christian Kuhn commented on patch set 2 CR -1 07/02/24, 00:36

    Unresolved

    this kinda feels as the wrong layer to me: shouldn't we rather add a default config of those fields - if missing - during TcaPreparation phase?
  8. Christian Kuhn commented on patch set 2 07/02/24, 00:43

    Unresolved

    my main concern at this point: the tca chain with loading form different files, overloading from overrides, then tca migration, then preparation, then TcaSchemaFactory, then columnsOverrides and inlineTcaChildOverride. When we now start deviating globals-tca from the schema-factory tca by adding columns on-the-fly on schema factory, we add yet another layer of complexity and can't rely on globals-tca anymore since it's structurally different from what schema-tca comes up with. I think we should avoid this: let's have those columns added in tcaPreparation phase. i'm currently preparing the class to contain some code that lies around as hacks elsewhere.
  9. Christian Kuhn commented on patch set 2 07/02/24, 01:07

    Unresolved

    note: i really think we should split column creation off to tcaPreparation. however, if this patch is a critical one for tomorrows release, we could go with it, but it then needs a follow-up afterwards. please override my vote if a merge is required this morning.

    TcaSchemaFactory.php:173

    this is either tcaMigration (gives a deprecation warning) or TcaPreparation (if that is supposed to be auto-magic).

    TcaSchemaFactory.php:329

    i do unterstand what you're doing here. it would however be much more clean to have the columns config added within tcaPreparation, for this code to rely on their existence, to then add columns[$fieldname] based on ctrl['enablecolumns'] if they are not part of $existingFields.
  10. Stefan Bürk voted on patch set 2 CR 0 V 0 07/02/24, 07:22

  11. Oli Bartsch commented on patch set 2 07/02/24, 13:25

    TcaSchemaFactory.php:173 Reply

    While we already have `sanitizeControlSectionIntegrity()` in TcaMigration (which does not log deprecation warnings), this should go into TcaPreparation. Same for the mentioned method. Will prepare a separate patch for this.

    TcaSchemaFactory.php:329 Reply Unresolved

    Same here, there is the `sanitizeControlSectionIntegrity()` which should be used for this kind of task.
  12. Oli Bartsch commented on patch set 2 07/02/24, 14:14

    TcaSchemaFactory.php:173 Reply Unresolved

  13. Christian Kuhn commented on patch set 2 07/05/24, 22:15

  14. Christian Kuhn abandoned the change 07/05/24, 22:19