Review main Merged

85786[TASK] Clean up TcaSchema field types

Oli Bartsch CR +2 V +2 Hard +220 −158 updated 09/10/24, 08:02

Commit message

Clean up of field types for TcaSchema.

In detail:

* Removes duplicate interface implementation
* Move __set_state() to abstract
* Introduces FieldFormat enum
* Extends some FieldType's for convenience methods
* Extends TcaSchema::getFields() to support list of fields
* Adds styleguide example for type=none with format configuration

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Jochen Roth +1
    • Benjamin Kott +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Jochen Roth +1
    • Benjamin Kott +1
    • core-ci +1 CI

Issues 1

Files 32

Show 12 more files

Review log 2232

Show 57 earlier messages
  1. Oli Bartsch uploaded patch set 1 08/27/24, 09:16

  2. Oli Bartsch updated the commit message in patch set 2 08/27/24, 09:17

  3. core-ci voted on patch set 2 V -1 08/27/24, 09:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64284

  4. core-ci voted on patch set 1 V -1 08/27/24, 09:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64283

  5. Benni Mack commented on patch set 2 08/27/24, 09:26

    AbstractRelationFieldType.php:26

    I would avoid doing inheritance (in general). Also, this change makes lazy developers to check for the instanceof the AbstractReionalFieldType class and not the interface anymore.
  6. Christian Kuhn commented on patch set 2 CR -1 08/27/24, 09:31

    i'm in favor of keeping the code duplicated and not trying to abstract this away.
  7. Christian Kuhn commented on patch set 2 08/27/24, 09:44

    Reply

    feel free to ignore this comment if both benni and you think this additional abstraction is really helpful. note: cgl wise, i'm very in favor of having all __magic() methods as first methods in classes since those are *important* to immediately see they have some magic fuctionality like __set_state, __construct, __destruct and so on, because those change the "profile" of classes so much. I'd go so far that we should have some cgl check for this to take care that's the case core-wide (other patch, if we decide on this).
  1. Oli Bartsch uploaded patch set 3 CR -1 V -1 08/27/24, 10:27

  2. core-ci voted on patch set 3 V -1 08/27/24, 10:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64289

  3. Oli Bartsch uploaded patch set 4 V -1 08/27/24, 10:34

  4. Oli Bartsch uploaded patch set 5 08/27/24, 10:35

  5. Oli Bartsch commented on patch set 5 08/27/24, 10:36

    Reply

    Acknowledged

    AbstractRelationFieldType.php:26 Reply

    Acknowledged
  6. core-ci voted on patch set 4 V -1 08/27/24, 10:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64290

  7. Oli Bartsch uploaded patch set 6 08/27/24, 10:39

  8. core-ci voted on patch set 5 V -1 08/27/24, 10:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64291

  9. core-ci voted on patch set 6 V +1 08/27/24, 10:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64292

  10. core-ci voted on patch set 5 V +1 08/27/24, 10:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64291

  11. Christian Kuhn voted on patch set 6 CR -1 08/27/24, 22:51

  12. Christian Kuhn commented on patch set 6 08/27/24, 23:07

    RelationalFieldTypeInterface.php:28

    general rule: keep interfaces composed, not inherited. decoupling over coupling. core examples where we actually removed interface inheritance: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85638/10/typo3/sysext/form/Classes/Mvc/Configuration/ConfigurationManagerInterface.php (recent) https://review.typo3.org/c/Packages/TYPO3.CMS/+/57987 (older)
  13. Oli Bartsch uploaded patch set 7 CR -1 V +1 08/28/24, 07:48

  14. Oli Bartsch commented on patch set 7 08/28/24, 07:49

    RelationalFieldTypeInterface.php:28 Reply

    Acknowledged
  15. core-ci voted on patch set 7 V +1 08/28/24, 07:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64390

  16. Oli Bartsch rebased onto patch set 8 V +1 09/03/24, 06:21

  17. core-ci voted on patch set 8 V +1 09/03/24, 06:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64649

  18. Simon Schaufelberger voted on patch set 8 CR +1 09/04/24, 09:47

  19. Jochen Roth voted on patch set 8 CR +1 V +1 09/09/24, 09:31

  20. Oli Bartsch uploaded patch set 9 CR +1 V +1 09/10/24, 07:32

  21. Jochen Roth voted on patch set 9 CR +1 V +1 09/10/24, 07:35

  22. core-ci voted on patch set 9 V +1 09/10/24, 07:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65183

  23. Benjamin Kott voted on patch set 9 CR +1 V +1 09/10/24, 07:54

  24. Oli Bartsch voted on patch set 9 CR +2 V +2 09/10/24, 08:02

  25. Oli Bartsch merged patch set 10 09/10/24, 08:02