Review main Merged Breaking

75188[!!!][FEATURE] Replace $GLOBALS['PAGES_TYPES'] with shared state object

Benni Mack CR +2 V +2 Hard +450 −210 updated 10/02/22, 17:40

Commit message

This change introduces a new registry class to be used
automatically instead of accessing $GLOBALS['PAGES_TYPES']
which is not evaluated anymore.

Also, instead of ExtensionManagementUtility::allowTableOnStandardPages()
the flag $TCA[$table][ctrl][security][ignorePageTypeRestriction]
is introduced which allows to avoid this call.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Georg Ringer +1
    • Kevin Appelt +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 62

Show 42 more files

Review log 2941

Show 916 earlier messages
  1. Benni Mack uploaded patch set 1 07/15/22, 08:50

  2. core-ci voted on patch set 1 V -1 07/15/22, 08:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29190

  3. Simon Schaufelberger commented on patch set 1 09/24/22, 23:11

    can this make it into v12?
  4. Benni Mack uploaded patch set 2 09/30/22, 20:09

  5. core-ci voted on patch set 2 V -1 09/30/22, 20:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31768

  6. Benni Mack uploaded patch set 3 09/30/22, 21:05

  7. Benni Mack uploaded patch set 4 09/30/22, 21:13

  8. core-ci voted on patch set 3 V +1 09/30/22, 21:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31773

  9. core-ci voted on patch set 4 V -1 09/30/22, 21:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31774

  10. Benni Mack uploaded patch set 5 09/30/22, 21:22

  11. Benni Mack uploaded patch set 6 09/30/22, 21:23

  12. core-ci voted on patch set 5 V +1 09/30/22, 21:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31776

  13. core-ci voted on patch set 6 V +1 09/30/22, 21:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31777

  14. Benni Mack uploaded patch set 7 09/30/22, 22:12

  15. Benni Mack commented on patch set 7 09/30/22, 22:13

    Reply

    Ready now.
  16. core-ci voted on patch set 7 V +1 09/30/22, 22:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31779

  1. Benni Mack commented on patch set 7 09/30/22, 22:21

    Reply

    Done
  2. Chris Müller commented on patch set 7 10/01/22, 06:32

    Breaking-98487-GLOBALSPAGES_TYPESRemoved.rst:34

    Before, a new page type is registered in ext_tables.php like this: $GLOBALS['PAGES_TYPES'][116] = [ 'type' => 'web', 'allowedTables' => '*', ]; The new way will be: $pageDoktypeRegistry = GeneralUtility::makeInstance(PageDoktypeRegistry); $pageDoktypeRegistry->add(116, [ 'type' => 'web', 'allowedTables' => '*', ]); Should this also be placed in ext_tables.php? And can we add the example to this RST?
  3. Georg Ringer voted on patch set 7 V +1 CR +1 10/01/22, 20:23

  4. Benni Mack commented on patch set 7 10/01/22, 21:34

    Breaking-98487-GLOBALSPAGES_TYPESRemoved.rst:34 Reply

    I think we could add this separately into TCA[pages][types] - at least that would be my wish. However, this is not 100% finalized yet, so the official "best practice" would be something to be documented later-on (probably 12.1). I hope this is OK if we provide extensive documentation about this at a later stage. This way we can avoid documenting something that we might need to change in further 12.x releases.
  5. Markus Klein commented on patch set 7 10/02/22, 00:09

    PageDoktypeRegistry.php:75

    same syntax as in line 87 can be used, right?

    PageDoktypeRegistry.php:89

    should we really keep this string-based (CSV)? Or could we go with arrays now?
  6. Chris Müller commented on patch set 7 10/02/22, 05:53

    Breaking-98487-GLOBALSPAGES_TYPESRemoved.rst:34 Reply

    Ack
  7. Benni Mack commented on patch set 7 10/02/22, 07:58

    PageDoktypeRegistry.php:89 Reply

    the good thing is we can change the underlying API now without being breaking anymore then :)
  8. Benni Mack commented on patch set 8 10/02/22, 07:59

    Published edit on patch set 7.
  9. Benni Mack commented on patch set 8 10/02/22, 07:59

    PageDoktypeRegistry.php:75 Reply

    Done

    PageDoktypeRegistry.php:89 Reply

    Done
  10. core-ci voted on patch set 8 V +1 10/02/22, 08:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31859

  11. Benni Mack uploaded patch set 9 10/02/22, 10:48

  12. core-ci voted on patch set 9 V -1 10/02/22, 11:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31869

  13. Benni Mack uploaded patch set 10 10/02/22, 11:15

  14. core-ci voted on patch set 10 V -1 10/02/22, 11:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31870

  15. Benni Mack uploaded patch set 11 10/02/22, 11:31

  16. core-ci voted on patch set 11 V +1 10/02/22, 11:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31871

  17. Kevin Appelt commented on patch set 11 10/02/22, 11:49

    PageDoktypeRegistry.php:51

    If I do understand it right, this should be "against a fallback", right? Or something like "against default values as fallback".

    ExtensionManagementUtility.php:724

    Is there a reason for checking for this call with an empty string and not telling the user about it? For me it seems like a misconfiguration and it should throw an exception.
  18. Benni Mack uploaded patch set 12 10/02/22, 12:08

  19. Benni Mack commented on patch set 11 10/02/22, 12:09

    PageDoktypeRegistry.php:51 Reply

    adapted the comment.

    ExtensionManagementUtility.php:724 Reply

    Yes. Previously, this was added to the global array as a concat string (= doing nothing), if we now add the table (which could be a list of tables with comma-separated) as well, there is no benefit of doing so. Through an exception does not harm, but is also not needed, as the method is not needed anymore (see RST).
  20. core-ci voted on patch set 12 V +1 10/02/22, 12:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31872

  21. Kevin Appelt commented on patch set 12 CR +1 10/02/22, 13:26

    ExtensionManagementUtility.php:724 Reply

    Ack
  22. Oliver Hader commented on patch set 12 CR +1 10/02/22, 17:29

    PageDoktypeRegistry.php:78 Unresolved

    It a bit ugly (really, just a little bit) - null, int, string and mixed array-keys. Anyway, since it's encapsulated internally, fine...
  23. Georg Ringer voted on patch set 12 V +1 CR +1 10/02/22, 17:38

  24. Oliver Hader voted on patch set 12 V +2 CR +2 10/02/22, 17:40

  25. Oliver Hader merged patch set 13 10/02/22, 17:40