[TASK] Avoid calling ModifyLoadedPageTsConfigEvent listeners twice
To streamline TypoScript related classes and namespaces, patch for #99120 introduced the new event \TYPO3\CMS\Core\TypoScript\IncludeTree\Event\ModifyLoadedPageTsConfigEvent and dispatching it. The old event with same signature at \TYPO3\CMS\Core\Configuration\Event\ModifyLoadedPageTsConfigEvent was kept, and continued to be dispatched to not introduce a breaking change anymore. The old event was changed to *extend* the new event. It turns out, the ListenerProvider is too clever at this point: When an event extends another event, it finds listeners for both events: When registering listeners for both the old and the new event, dispatching the old event will call listeners of the new event as well. Listeners can't distinguish this. To prepare for easy removal in v13, we now change the old event to no longer *extend* the new event. We continue to dispatch both events, though. The ReST file is adapted towards a better example on how to stay compatible in an extension and prepare for v13 as much as possible at the same time. Resolves: #100060 Related: #97816 Related: #99120 Change-Id: If5813ce2110de6078de33fa84ade57e852985266 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78000 Tested-by:Nikita Hovratov <nikita.h@live.de> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- typo3/sysext/core/Classes/Configuration/Event/ModifyLoadedPageTsConfigEvent.php 25 additions, 3 deletions...ses/Configuration/Event/ModifyLoadedPageTsConfigEvent.php
- typo3/sysext/core/Classes/TypoScript/IncludeTree/Event/ModifyLoadedPageTsConfigEvent.php 1 addition, 3 deletions...cript/IncludeTree/Event/ModifyLoadedPageTsConfigEvent.php
- typo3/sysext/core/Classes/TypoScript/IncludeTree/TsConfigTreeBuilder.php 1 addition, 1 deletion...re/Classes/TypoScript/IncludeTree/TsConfigTreeBuilder.php
- typo3/sysext/core/Documentation/Changelog/12.2/Deprecation-99120-DeprecateOldTypoScriptParser.rst 59 additions, 8 deletions...g/12.2/Deprecation-99120-DeprecateOldTypoScriptParser.rst
Please register or sign in to comment