refactor: PHP 8.5 language features via Rector
rector.php gets the PHP sets up to 8.5. Mostly constructor promotion with readonly properties, typed class constants, ??=, arrow functions, str_contains/str_starts_with, catch without unused variables, array_any and #[\Override] on overridden properties; array_key_exists() keys are cast to string (null keys are deprecated in PHP 8.5). Long promoted constructor signatures are wrapped one parameter per line. Checked locally: a crawl of ~1,900 frontend URLs over all sites and the backchannel APIs (/api/hotel, /api/product, content feed manifest and records of every type) render the same as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
96632edf44
commit
b51fa4ddad
61 files changed
+320
-609
No files matched your search
@@ -1,15 +1,19 @@
|
||||
<?php
|
||||
|
||||
use EP\EpTheme\Middleware\CdnImageMiddleware;
|
||||
use EP\EpTheme\Middleware\ReferrerMiddleware;
|
||||
use EP\EpTheme\Middleware\HtmxRedirectMiddleware;
|
||||
|
||||
return [
|
||||
'frontend' => [
|
||||
'ep/cdn-images' => [
|
||||
'target' => \EP\EpTheme\Middleware\CdnImageMiddleware::class,
|
||||
'target' => CdnImageMiddleware::class,
|
||||
'after' => [
|
||||
'typo3/cms-frontend/page-resolver',
|
||||
],
|
||||
],
|
||||
'ep/referrer' => [
|
||||
'target' => \EP\EpTheme\Middleware\ReferrerMiddleware::class,
|
||||
'target' => ReferrerMiddleware::class,
|
||||
'after' => [
|
||||
'typo3/cms-frontend/authentication',
|
||||
],
|
||||
@@ -20,7 +24,7 @@ return [
|
||||
// Outermost of the frontend stack after the site is known, so it also sees redirects
|
||||
// that core middlewares or exceptions (PropagateResponseException) produce
|
||||
'ep/htmx-redirect' => [
|
||||
'target' => \EP\EpTheme\Middleware\HtmxRedirectMiddleware::class,
|
||||
'target' => HtmxRedirectMiddleware::class,
|
||||
'after' => [
|
||||
'typo3/cms-frontend/site',
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user