Skip to content

Commit 5926110

Browse files
author
Achim Fritz
committed
!!![TASK] Change TYPO3 Version Requirements
* drop Support for TYPO3 Versions < 10 * add Support for TYPO3 Version 12
1 parent 965003e commit 5926110

File tree

5 files changed

+8
-32
lines changed

5 files changed

+8
-32
lines changed

Classes/ResourcePusher.php

-21
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,6 @@ public function pushAll(array $resources)
3838
}
3939
}
4040

41-
/**
42-
* @param array $params
43-
* @param TypoScriptFrontendController $typoScriptFrontendController
44-
* @internal this is just a hook implementation. can be removed when TYPO3 v9 support is removed.
45-
*/
46-
public function pushForFrontend(array $params, TypoScriptFrontendController $typoScriptFrontendController)
47-
{
48-
$allResources = $typoScriptFrontendController->config['b13/http2'] ?? null;
49-
if ($this->useHook() && GeneralUtility::getIndpEnv('TYPO3_SSL') && is_array($allResources)) {
50-
$this->pushAll($allResources);
51-
}
52-
}
53-
5441
/**
5542
* as="{style/script/image}"
5643
*
@@ -61,12 +48,4 @@ protected function addPreloadHeader(string $uri, string $type)
6148
{
6249
header('Link: <' . htmlspecialchars(PathUtility::getAbsoluteWebPath($uri)) . '>; rel=preload; as=' . $type, false);
6350
}
64-
65-
protected function useHook(): bool
66-
{
67-
if (class_exists(Typo3Version::class) && (new Typo3Version())->getMajorVersion() >= 10) {
68-
return false;
69-
}
70-
return true;
71-
}
7251
}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ This TYPO3 extension fetches all CSS and JS resources that are used
88
for a page-rendering and sends additional HTTP/2 Headers "Link" for each resource
99
resulting in a faster first contentful paint for TYPO3 CMS.
1010

11-
This extension currently runs on TYPO3 v7, TYPO3 v8, TYPO3 v9, TYPO3 v10 and TYPO3 v11,
12-
and needs PHP 7.0 or higher.
11+
This extension currently runs on TYPO3 v10, TYPO3 v11 and TYPO3 v12,
12+
and needs PHP 7.4 or higher.
1313

1414
## Installation
1515

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"type": "typo3-cms-extension",
44
"description": "Speed up TYPO3 rendering via HTTP/2 Server Push",
55
"require": {
6-
"php": "^7.0 || ^8.0",
6+
"php": "^7.4 || ^8.0",
77
"psr/http-server-middleware": "^1.0",
8-
"typo3/cms-core": "^7.6 || ^8.7 || ^9.5 || ^10.0 || ^11.0",
9-
"typo3/cms-frontend": "^7.6 || ^8.7 || ^9.5 || ^10.0 || ^11.0"
8+
"typo3/cms-core": "^10.0 || ^11.0 || ^12.0",
9+
"typo3/cms-frontend": "^10.0 || ^11.0 || ^12.0"
1010
},
1111
"require-dev": {
1212
"phpunit/phpunit": "~7.0",

ext_emconf.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
'title' => 'HTTP2 Server Push Support for TYPO3',
55
'description' => '',
66
'category' => 'extension',
7-
'version' => '1.1.1',
7+
'version' => '2.0.0',
88
'state' => 'stable',
99
'clearcacheonload' => 1,
1010
'author' => 'b13 GmbH',
1111
'author_email' => 'typo3@b13.com',
1212
'author_company' => 'b13 GmbH',
1313
'constraints' => [
1414
'depends' => [
15-
'typo3' => '7.6.0-11.99.99',
15+
'typo3' => '10.4.0-12.99.99',
1616
],
1717
],
1818
];

ext_localconf.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?php
2-
defined('TYPO3_MODE') or die();
2+
defined('TYPO3') or die();
33

44
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postProcess']['b13/http2'] = B13\Http2\PageRendererHook::class . '->accumulateResources';
5-
6-
// can be removed as soon as TYPO3 v9 support is dropped, as this is now taken care of by a middleware
7-
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output']['b13/http2'] = B13\Http2\ResourcePusher::class . '->pushForFrontend';

0 commit comments

Comments
 (0)