Review main Merged Breaking

74516[!!!][FEATURE] Introduce PSR-14 events in TSFE page resolving

Benni Mack CR +2 V +2 Hard +365 −89 updated 06/07/22, 21:14

Commit message

This change introduces three new PSR-14 Events in favor
of the following hooks:

* $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PreProcessing']

replaced by "BeforePageIsResolvedEvent"

* $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['fetchPageId-PostProcessing']
* $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess']

replaced by "AfterPageWithRootLineIsResolvedEvent"

* $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PostProc']
* $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_postProcess']

replaced by "AfterPageAndLanguageIsResolvedEvent"

Due to the restructuring of TSFE in the past versions, it became
obvious that several hooks are called right after each other,
making them superfluous. For this reason, they have been unified.

The new PSR-14 Events are more powerful as they also contain the
current request.

In addition TSFE->determineId() can now intercept the process
by properly returning a Response object.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 1013

  1. Benni Mack uploaded patch set 1 05/04/22, 11:11

  2. core-ci voted on patch set 1 V +1 05/04/22, 11:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26812

  3. Benni Mack uploaded patch set 2 06/07/22, 10:15

  4. core-ci voted on patch set 2 V +1 06/07/22, 10:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27766

  5. Oli Bartsch uploaded patch set 3 06/07/22, 10:34

  6. Oli Bartsch voted on patch set 3 V +1 CR +1 06/07/22, 10:34

  7. core-ci voted on patch set 3 V +1 06/07/22, 10:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27768

  8. Oliver Klee commented on patch set 3 06/07/22, 11:08

    Can we cover this with tests to make sure the events get triggered properly, and that their getters/setters work correctly?
  9. Christian Kuhn voted on patch set 3 V +1 CR +1 06/07/22, 14:47

  10. Benni Mack voted on patch set 3 V +2 CR +2 06/07/22, 14:50

  11. Benni Mack merged patch set 4 06/07/22, 14:50

  12. Benni Mack commented on patch set 4 06/07/22, 20:04

    Reply

    Hey Oli, sorry did not see your response! Will provide a separate patch with tests!
  13. Oliver Klee commented on patch set 4 06/07/22, 21:14

    Reply

    Thanks, Benni!