From d56f56cf53e3cb75a241e6163efda1fd3fb371aa Mon Sep 17 00:00:00 2001 From: Lamm Date: Tue, 16 Sep 2025 08:46:40 +0200 Subject: [PATCH] Rector broke instanciating in v11 --- Classes/Utility/IsCacheableUtility.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Classes/Utility/IsCacheableUtility.php b/Classes/Utility/IsCacheableUtility.php index 8e5fe05..056182d 100644 --- a/Classes/Utility/IsCacheableUtility.php +++ b/Classes/Utility/IsCacheableUtility.php @@ -15,10 +15,6 @@ */ class IsCacheableUtility { - public function __construct(private readonly Context $context) - { - } - public function usePageCache(?TypoScriptFrontendController $typoScriptFrontendController = null, bool $usePageCache = true): bool { if (!$usePageCache) { @@ -30,7 +26,7 @@ public function usePageCache(?TypoScriptFrontendController $typoScriptFrontendCo return $usePageCache; } - $context = $this->context; + $context = GeneralUtility::makeInstance(Context::class); assert($context instanceof Context); $backendUserContext = $context->getAspect('backend.user'); if ($backendUserContext->isLoggedIn()) {