Skip to content

Commit e25771b

Browse files
authored
Merge pull request #12 from pluswerk/performance
2 parents b08d6e5 + 8018350 commit e25771b

5 files changed

Lines changed: 16 additions & 19 deletions

File tree

.github/workflows/tasks.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
php: [ '8.0', '8.1', '8.2' ]
12+
php: [ '8.1', '8.2', '8.3' ]
1313
typo3: [ '11', '12' ]
14-
exclude:
15-
- php: '8.0'
16-
typo3: '12'
1714
steps:
1815
- name: Setup PHP with PECL extension
1916
uses: shivammathur/setup-php@v2

Classes/Service/MinifyService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ public function minify(string $html): string
4848
$html = $htmlMin->minify($html);
4949
}
5050

51-
if (empty($html)) {
51+
if (!$html) {
5252
return $originalHtml;
5353
}
5454

55-
return $html;
55+
return $html . (str_contains($html, '</body>') ? '' : '</body>');
5656
}
5757

5858

Configuration/RequestMiddlewares.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
'after' => [
1212
'typo3/cms-frontend/output-compression',
1313
'typo3/cms-frontend/content-length-headers',
14+
'typo3/cms-adminpanel/renderer', // after the adminpanel render, this takes some time to process and is not neccesarly needed
1415
],
1516
// in the request direction it is before these middlewares:
1617
// but in response direction it is after these middlewares:
1718
'before' => [
18-
'typo3/cms-adminpanel/renderer',
19+
'typo3/cms-adminpanel/data-persister',
20+
'typo3/cms-frontend/csp-headers',
1921
]
2022
]
2123
]

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
"source": "https://github.com/pluswerk/minify"
99
},
1010
"require": {
11-
"php": "^8.0",
11+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
1212
"composer-runtime-api": "^2",
1313
"typo3/cms-core": "^11.5 || ^12.4",
1414
"voku/html-min": "^4.5"
1515
},
1616
"require-dev": {
17-
"andersundsehr/ssi-include": "dev-main",
18-
"pluswerk/grumphp-config": "^6",
19-
"saschaegerer/phpstan-typo3": "^1.8.2",
20-
"ssch/typo3-rector": "^1.1.3"
17+
"andersundsehr/ssi-include": "^1.1.0",
18+
"pluswerk/grumphp-config": "^7",
19+
"saschaegerer/phpstan-typo3": "^1.10.0",
20+
"ssch/typo3-rector": "^2.5.0"
2121
},
2222
"autoload": {
2323
"psr-4": {
@@ -26,12 +26,12 @@
2626
},
2727
"config": {
2828
"allow-plugins": {
29-
"typo3/cms-composer-installers": true,
30-
"typo3/class-alias-loader": true,
29+
"ergebnis/composer-normalize": true,
3130
"phpro/grumphp": true,
32-
"pluswerk/grumphp-config": true,
3331
"phpstan/extension-installer": true,
34-
"ergebnis/composer-normalize": true
32+
"pluswerk/grumphp-config": true,
33+
"typo3/class-alias-loader": true,
34+
"typo3/cms-composer-installers": true
3535
},
3636
"sort-packages": true
3737
},

rector.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use PLUS\GrumPHPConfig\RectorSettings;
66
use Rector\Config\RectorConfig;
77
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
8-
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
98

109
return static function (RectorConfig $rectorConfig): void {
1110
$rectorConfig->parallel();
@@ -22,7 +21,7 @@
2221
$rectorConfig->sets(
2322
[
2423
...RectorSettings::sets(true),
25-
...RectorSettings::setsTypo3(false),
24+
...RectorSettings::setsTypo3(true),
2625
]
2726
);
2827

@@ -32,7 +31,6 @@
3231
[
3332
...RectorSettings::skip(),
3433
...RectorSettings::skipTypo3(),
35-
FinalizeClassesWithoutChildrenRector::class,
3634
/**
3735
* rector should not touch these files
3836
*/

0 commit comments

Comments
 (0)