Review main Abandoned

70521[FEATURE] Add support for an object interface on top of the config array.

crell CR 0 V 0 Hard +629 −6 updated 11/03/21, 16:42

Commit message

This is a preliminary, barely proof-of-concept demonstration. The
general concept is to use the Symfony Serializer component (or similar)
to translate the TYPO3_CONF_VARS array into a series of defined classed
objects.  Those objects are available through the container, and thus
easily injectable. As objects, they also handle type enforcement,
default values, and a place to put common utility methods for a given
configuration value.  That can remove a ton of code from other places
in the system that right now has to individually account for the
unpredictable nature of PHP arrays.

Review

  • Code review CR 0
  • Verified V 0

Files 13

Review log 1725

  1. crell uploaded patch set 1 08/12/21, 19:20

  2. core-ci voted on patch set 1 V -1 08/12/21, 19:23 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14837

  3. crell uploaded patch set 2 08/13/21, 17:22

  4. core-ci voted on patch set 2 V -1 08/13/21, 17:27 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15007

  5. crell uploaded patch set 3 08/13/21, 17:28

  6. core-ci voted on patch set 3 V -1 08/13/21, 17:33 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15008

  7. crell uploaded patch set 4 08/16/21, 15:51

  8. core-ci voted on patch set 4 V -1 08/16/21, 15:58 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15196

  9. crell uploaded patch set 5 08/16/21, 16:18

  10. core-ci voted on patch set 5 V -1 08/16/21, 16:21 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15197

  11. crell uploaded patch set 6 08/16/21, 17:03

  12. core-ci voted on patch set 6 V -1 08/16/21, 17:23 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15200

  13. Oliver Klee commented on patch set 6 08/16/21, 18:52

    GfxConfig.php:86

    The dollar signs after the $this-> don't look right. Possibly a copy'n'paste (or replace) error?
  14. crell uploaded patch set 7 08/20/21, 18:50

  15. core-ci voted on patch set 7 V -1 08/20/21, 19:11 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15347

  16. crell marked it work in progress 08/20/21, 19:46

  17. crell uploaded patch set 8 08/20/21, 20:28

  18. crell commented on patch set 8 08/20/21, 20:30

    This change is ready for review.

    GfxConfig.php:86 Reply

    Ooof, yeah, that's why I hate PHP 7.4 for this. Copy-pasta everywhere.
  19. core-ci voted on patch set 8 V +1 08/20/21, 20:42 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15353

  20. Oliver Klee wrote 08/20/21, 21:39

    Removed reviewer Oliver Klee.
  21. Oliver Klee commented on patch set 8 CR -1 08/20/21, 21:40

    The ticket is still missing here.
  22. crell commented on patch set 8 08/23/21, 14:37

    Reply

    Yes, this is just a demo/PoC. It's not going to get merged to v11. Assuming we decide to proceed for v12, I'll redo it using just attributes and other PHP 8 syntax, probably after PHP 8.1 is released so I can use readonly. The open question is which serialization library to use. cf: https://decisions.typo3.org/t/object-interface-to-typo3-conf-vars/706/
  23. Oliver Klee wrote 08/28/21, 14:19

    Removed reviewer Oliver Klee with the following votes: * Code-Review-1 by Oliver Klee <typo3-coding@oliverklee.de>
  24. Christian Kuhn commented on patch set 8 11/03/21, 16:42

    Hey. I hope it's ok to abandon this demo patch for now: It can of course still be referenced when referring to it in conversation, but it probably won't make it as such and will probably not be finished soon as it looks right now. If work is continued here, it can be resurrected, too.
  25. Christian Kuhn abandoned the change 11/03/21, 16:42