Skip to content

Commit 954c005

Browse files
thomashohnlolli42
authored andcommitted
[!!!][TASK] Remove deprecated methods in TypoScriptFrontendController
The following PHP class methods that have previously been marked as deprecated for v13 have been removed in class `\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController`: - `addCacheTags()` - `getPageCacheTags()` Resolves: #105460 Related: #105377 Related: #102422 Releases: main Change-Id: I9c24f68e6b697e76c2cfc5bd721027ce176b30ed Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86775 Tested-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com> Reviewed-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com>
1 parent 5f44404 commit 954c005

File tree

3 files changed

+4
-31
lines changed

3 files changed

+4
-31
lines changed

typo3/sysext/core/Documentation/Changelog/14.0/Breaking-105377-DeprecatedFunctionalityRemoved.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ The following PHP class methods that have previously been marked as deprecated w
9191
- :php:`\TYPO3\CMS\Fluid\View\FluidViewAdapter->setTemplateRootPaths()`
9292
- :php:`\TYPO3\CMS\Fluid\View\FluidViewAdapter->setTemplateSource()`
9393
- :php:`\TYPO3\CMS\Fluid\View\TemplatePaths->fillDefaultsByPackageName()`
94+
- :php:`\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->addCacheTags()`
95+
- :php:`\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->getPageCacheTags()`
9496
- :php:`\TYPO3\CMS\Frontend\Page\PageRepository->enableFields()`
9597

9698
The following PHP static class methods that have previously been marked as deprecated for v13 have been removed:

typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -405,37 +405,6 @@ protected function setSysLastChanged(ServerRequestInterface $request): void
405405
}
406406
}
407407

408-
/**
409-
* Adds tags to this page's cache entry, you can then f.e. remove cache
410-
* entries by tag
411-
*
412-
* @param array $tags An array of tag
413-
* @deprecated since TYPO3 v13, will be removed in TYPO3 v14. Use $request->getAttribute('frontend.cache.collector')->addCacheTags(new CacheTag($tag, $lifetime)) instead.
414-
*/
415-
public function addCacheTags(array $tags)
416-
{
417-
trigger_error(
418-
'TypoScriptFrontendController->addCacheTags has been marked as deprecated in TYPO3 v13. Use $request->getAttribute(\'frontend.cache.collector\')->addCacheTags(new CacheTag($tag, $lifetime)) instead.',
419-
E_USER_DEPRECATED,
420-
);
421-
$cacheDataCollector = $GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.cache.collector');
422-
$cacheDataCollector->addCacheTags(...array_map(fn(string $tag) => new CacheTag($tag), $tags));
423-
}
424-
425-
/**
426-
* @return array
427-
* @deprecated since TYPO3 v13, will be removed in TYPO3 v14. Use $request->getAttribute('frontend.cache.collector')->getCacheTags() instead.
428-
*/
429-
public function getPageCacheTags(): array
430-
{
431-
trigger_error(
432-
'TypoScriptFrontendController->getPageCacheTags has been marked as deprecated in TYPO3 v13. Use $request->getAttribute(\'frontend.cache.collector\')->getCacheTags() instead.',
433-
E_USER_DEPRECATED,
434-
);
435-
$cacheDataCollector = $GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.cache.collector');
436-
return array_map(fn(CacheTag $cacheTag) => $cacheTag->name, $cacheDataCollector->getCacheTags());
437-
}
438-
439408
/**
440409
* Sets up TypoScript "config." options and set properties in $TSFE.
441410
*

typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6372,13 +6372,15 @@
63726372
'maximumNumberOfArguments' => 1,
63736373
'restFiles' => [
63746374
'Deprecation-102422-TypoScriptFrontendController-addCacheTags.rst',
6375+
'Breaking-105377-DeprecatedFunctionalityRemoved.rst',
63756376
],
63766377
],
63776378
'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->getPageCacheTags' => [
63786379
'numberOfMandatoryArguments' => 0,
63796380
'maximumNumberOfArguments' => 0,
63806381
'restFiles' => [
63816382
'Deprecation-102422-TypoScriptFrontendController-addCacheTags.rst',
6383+
'Breaking-105377-DeprecatedFunctionalityRemoved.rst',
63826384
],
63836385
],
63846386
];

0 commit comments

Comments
 (0)