diff --git a/Classes/ResourcePusher.php b/Classes/ResourcePusher.php index 6d53e04..5d7f7c9 100644 --- a/Classes/ResourcePusher.php +++ b/Classes/ResourcePusher.php @@ -38,19 +38,6 @@ public function pushAll(array $resources) } } - /** - * @param array $params - * @param TypoScriptFrontendController $typoScriptFrontendController - * @internal this is just a hook implementation. can be removed when TYPO3 v9 support is removed. - */ - public function pushForFrontend(array $params, TypoScriptFrontendController $typoScriptFrontendController) - { - $allResources = $typoScriptFrontendController->config['b13/http2'] ?? null; - if ($this->useHook() && GeneralUtility::getIndpEnv('TYPO3_SSL') && is_array($allResources)) { - $this->pushAll($allResources); - } - } - /** * as="{style/script/image}" * @@ -61,12 +48,4 @@ protected function addPreloadHeader(string $uri, string $type) { header('Link: <' . htmlspecialchars(PathUtility::getAbsoluteWebPath($uri)) . '>; rel=preload; as=' . $type, false); } - - protected function useHook(): bool - { - if (class_exists(Typo3Version::class) && (new Typo3Version())->getMajorVersion() >= 10) { - return false; - } - return true; - } } diff --git a/README.md b/README.md index 1ffa292..6deb6db 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ This TYPO3 extension fetches all CSS and JS resources that are used for a page-rendering and sends additional HTTP/2 Headers "Link" for each resource resulting in a faster first contentful paint for TYPO3 CMS. -This extension currently runs on TYPO3 v7, TYPO3 v8, TYPO3 v9, TYPO3 v10 and TYPO3 v11, -and needs PHP 7.0 or higher. +This extension currently runs on TYPO3 v10, TYPO3 v11 and TYPO3 v12, +and needs PHP 7.4 or higher. ## Installation diff --git a/composer.json b/composer.json index bab14fb..6d8ffa3 100644 --- a/composer.json +++ b/composer.json @@ -3,10 +3,10 @@ "type": "typo3-cms-extension", "description": "Speed up TYPO3 rendering via HTTP/2 Server Push", "require": { - "php": "^7.0 || ^8.0", + "php": "^7.4 || ^8.0", "psr/http-server-middleware": "^1.0", - "typo3/cms-core": "^7.6 || ^8.7 || ^9.5 || ^10.0 || ^11.0", - "typo3/cms-frontend": "^7.6 || ^8.7 || ^9.5 || ^10.0 || ^11.0" + "typo3/cms-core": "^10.0 || ^11.0 || ^12.0", + "typo3/cms-frontend": "^10.0 || ^11.0 || ^12.0" }, "require-dev": { "phpunit/phpunit": "~7.0", diff --git a/ext_emconf.php b/ext_emconf.php index 407263a..487458a 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -4,7 +4,7 @@ 'title' => 'HTTP2 Server Push Support for TYPO3', 'description' => '', 'category' => 'extension', - 'version' => '1.1.1', + 'version' => '2.0.0', 'state' => 'stable', 'clearcacheonload' => 1, 'author' => 'b13 GmbH', @@ -12,7 +12,7 @@ 'author_company' => 'b13 GmbH', 'constraints' => [ 'depends' => [ - 'typo3' => '7.6.0-11.99.99', + 'typo3' => '10.4.0-12.99.99', ], ], ]; diff --git a/ext_localconf.php b/ext_localconf.php index 9fccf8a..083208c 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -1,7 +1,4 @@ accumulateResources'; - -// can be removed as soon as TYPO3 v9 support is dropped, as this is now taken care of by a middleware -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output']['b13/http2'] = B13\Http2\ResourcePusher::class . '->pushForFrontend';