diff --git a/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php b/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php
index b22f6617ff1f83547f10807141fc3f9c9475d773..4d88ad4a7c496f1b56694b5c8c831af7011ffcc8 100644
--- a/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php
+++ b/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php
@@ -50,10 +50,8 @@ class BackendUserAuthenticator extends \TYPO3\CMS\Core\Middleware\BackendUserAut
 
     /**
      * List of requests that don't need a valid BE user
-     *
-     * @var array
      */
-    protected $publicRoutes = [
+    protected array $publicRoutes = [
         '/login',
         '/login/frame',
         '/login/password-reset/forget',
diff --git a/typo3/sysext/backend/Classes/Middleware/LockedBackendGuard.php b/typo3/sysext/backend/Classes/Middleware/LockedBackendGuard.php
index b28365712def5177c7ea41e76207c765d1b9d642..d80858392e0af8468a7334631771385a909676c4 100644
--- a/typo3/sysext/backend/Classes/Middleware/LockedBackendGuard.php
+++ b/typo3/sysext/backend/Classes/Middleware/LockedBackendGuard.php
@@ -74,10 +74,9 @@ class LockedBackendGuard implements MiddlewareInterface
     /**
      * Check adminOnly configuration variable and redirects to an URL in file typo3conf/LOCK_BACKEND
      *
-     * @return string|null
      * @throws BackendLockedException
      */
-    protected function checkLockedBackend()
+    protected function checkLockedBackend(): ?string
     {
         if ($GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] < 0) {
             throw new BackendLockedException(
diff --git a/typo3/sysext/backend/Classes/Middleware/OutputCompression.php b/typo3/sysext/backend/Classes/Middleware/OutputCompression.php
index b0345f93067edc95120243415f180fb8c9e412ff..7a1570dcbf93833027f792f81ab6063f0612ed13 100644
--- a/typo3/sysext/backend/Classes/Middleware/OutputCompression.php
+++ b/typo3/sysext/backend/Classes/Middleware/OutputCompression.php
@@ -46,7 +46,7 @@ class OutputCompression implements MiddlewareInterface
     /**
      * Initialize output compression if configured
      */
-    protected function initializeOutputCompression()
+    protected function initializeOutputCompression(): void
     {
         if (extension_loaded('zlib') && $GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel']) {
             if (MathUtility::canBeInterpretedAsInteger($GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel'])) {
diff --git a/typo3/sysext/core/Classes/Middleware/BackendUserAuthenticator.php b/typo3/sysext/core/Classes/Middleware/BackendUserAuthenticator.php
index a3eda9407bf3dc0cfbb5f2a6c4b0a94ebff726f3..24289fbdca1245e8e4413e3156e780a0f8d7fcfe 100644
--- a/typo3/sysext/core/Classes/Middleware/BackendUserAuthenticator.php
+++ b/typo3/sysext/core/Classes/Middleware/BackendUserAuthenticator.php
@@ -49,14 +49,8 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  */
 abstract class BackendUserAuthenticator implements MiddlewareInterface
 {
-    /**
-     * @var Context
-     */
-    protected $context;
-
-    public function __construct(Context $context)
+    public function __construct(protected Context $context)
     {
-        $this->context = $context;
     }
 
     abstract public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface;
diff --git a/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php b/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php
index 993b9b38eee9b8d5b20bfd5e16c486e2a9260e09..95fea6fbba9a316ed5bbdc7bf3cf45270284b7bf 100644
--- a/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php
+++ b/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php
@@ -39,14 +39,11 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  */
 class BackendUserAuthenticator extends \TYPO3\CMS\Core\Middleware\BackendUserAuthenticator
 {
-    private LanguageServiceFactory $languageServiceFactory;
-
     public function __construct(
         Context $context,
-        LanguageServiceFactory $languageServiceFactory
+        protected readonly LanguageServiceFactory $languageServiceFactory
     ) {
         parent::__construct($context);
-        $this->languageServiceFactory = $languageServiceFactory;
     }
 
     /**
@@ -89,12 +86,9 @@ class BackendUserAuthenticator extends \TYPO3\CMS\Core\Middleware\BackendUserAut
     }
 
     /**
-     * Creates the backend user object and returns it.
-     *
-     * @return FrontendBackendUserAuthentication|null the backend user object or null if there was no valid user found
-     * @throws \TYPO3\CMS\Core\Exception
+     * Creates the backend user object and returns it if a valid backend user is found.
      */
-    protected function initializeBackendUser(ServerRequestInterface $request)
+    protected function initializeBackendUser(ServerRequestInterface $request): ?FrontendBackendUserAuthentication
     {
         // New backend user object
         $backendUserObject = GeneralUtility::makeInstance(FrontendBackendUserAuthentication::class);
@@ -119,10 +113,9 @@ class BackendUserAuthenticator extends \TYPO3\CMS\Core\Middleware\BackendUserAut
 
     /**
      * Implementing the access checks that the TYPO3 CMS bootstrap script does before a user is ever logged in.
-     *
-     * @return bool Returns TRUE if access is OK
+     * Returns TRUE if access is OK
      */
-    protected function isAuthenticated(FrontendBackendUserAuthentication $user, NormalizedParams $normalizedParams)
+    protected function isAuthenticated(FrontendBackendUserAuthentication $user, NormalizedParams $normalizedParams): bool
     {
         // Check IP
         $ipMask = trim($GLOBALS['TYPO3_CONF_VARS']['BE']['IPmaskList'] ?? '');
diff --git a/typo3/sysext/frontend/Classes/Middleware/EidHandler.php b/typo3/sysext/frontend/Classes/Middleware/EidHandler.php
index f9981f676fb13e7c445beba402bb332bc989dfa2..15502ba211fd1514d0ffa6f87b482e69e33366e9 100644
--- a/typo3/sysext/frontend/Classes/Middleware/EidHandler.php
+++ b/typo3/sysext/frontend/Classes/Middleware/EidHandler.php
@@ -21,7 +21,6 @@ use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\MiddlewareInterface;
 use Psr\Http\Server\RequestHandlerInterface;
-use TYPO3\CMS\Core\Exception;
 use TYPO3\CMS\Core\Http\DispatcherInterface;
 use TYPO3\CMS\Core\Http\Response;
 
@@ -41,8 +40,6 @@ class EidHandler implements MiddlewareInterface
 
     /**
      * Dispatches the request to the corresponding eID class or eID script
-     *
-     * @throws Exception
      */
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
     {
diff --git a/typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php b/typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php
index d8a7a2ed69c60d25360c89ed214ec8a2231c53b2..c30e892916b5f00263d160a9d717c377d156755e 100644
--- a/typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php
+++ b/typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php
@@ -39,16 +39,10 @@ class FrontendUserAuthenticator implements MiddlewareInterface, LoggerAwareInter
 {
     use LoggerAwareTrait;
 
-    /**
-     * @var Context
-     */
-    protected $context;
-    protected RateLimiterFactory $rateLimiterFactory;
-
-    public function __construct(Context $context, RateLimiterFactory $rateLimiterFactory)
-    {
-        $this->context = $context;
-        $this->rateLimiterFactory = $rateLimiterFactory;
+    public function __construct(
+        protected readonly Context $context,
+        protected readonly RateLimiterFactory $rateLimiterFactory
+    ) {
     }
 
     /**
diff --git a/typo3/sysext/frontend/Classes/Middleware/OutputCompression.php b/typo3/sysext/frontend/Classes/Middleware/OutputCompression.php
index c77c0647315f52283b97e3c67cf4305d530a4e84..deddcf9e98b338cc40004ccb0bd334d39d451f9c 100644
--- a/typo3/sysext/frontend/Classes/Middleware/OutputCompression.php
+++ b/typo3/sysext/frontend/Classes/Middleware/OutputCompression.php
@@ -47,7 +47,7 @@ class OutputCompression implements MiddlewareInterface
     /**
      * Initialize output compression if configured
      */
-    protected function initializeOutputCompression()
+    protected function initializeOutputCompression(): void
     {
         if ($GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] && extension_loaded('zlib')) {
             if (MathUtility::canBeInterpretedAsInteger($GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'])) {
diff --git a/typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php b/typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php
index af9db15809b1cccd7217b8fb50577374f7b096e6..cf0c9fcceed2c808f9ac0125b8f6a586314ce333 100644
--- a/typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php
+++ b/typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php
@@ -40,29 +40,15 @@ class PageArgumentValidator implements MiddlewareInterface, LoggerAwareInterface
 {
     use LoggerAwareTrait;
 
-    /**
-     * The cHash Service class used for cHash related functionality
-     *
-     * @var CacheHashCalculator
-     */
-    protected $cacheHashCalculator;
-
-    /**
-     * @var TimeTracker
-     */
-    protected $timeTracker;
-
     /**
      * @var bool will be used to set $TSFE->no_cache later-on
      */
-    protected $disableCache = false;
+    protected bool $disableCache = false;
 
     public function __construct(
-        CacheHashCalculator $cacheHashCalculator,
-        TimeTracker $timeTracker
+        protected readonly CacheHashCalculator $cacheHashCalculator,
+        protected readonly TimeTracker $timeTracker
     ) {
-        $this->cacheHashCalculator = $cacheHashCalculator;
-        $this->timeTracker = $timeTracker;
     }
 
     /**
diff --git a/typo3/sysext/frontend/Classes/Middleware/PreviewSimulator.php b/typo3/sysext/frontend/Classes/Middleware/PreviewSimulator.php
index 7ff89d89b96c1c55a760473d6d49cb745dcd8d93..ffe0d1cb6a02275c34253bdc3b54293ffcf4c277 100644
--- a/typo3/sysext/frontend/Classes/Middleware/PreviewSimulator.php
+++ b/typo3/sysext/frontend/Classes/Middleware/PreviewSimulator.php
@@ -39,11 +39,8 @@ use TYPO3\CMS\Frontend\Page\PageAccessFailureReasons;
  */
 class PreviewSimulator implements MiddlewareInterface
 {
-    private Context $context;
-
-    public function __construct(Context $context)
+    public function __construct(protected readonly Context $context)
     {
-        $this->context = $context;
     }
 
     /**
diff --git a/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php b/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php
index 45b2b259883da72dfa6577089a511d4902a786fb..8ef8051b304bdfe2e27713e742ccda6025cfe400 100644
--- a/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php
+++ b/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php
@@ -92,10 +92,8 @@ class SiteBaseRedirectResolver implements MiddlewareInterface
 
     /**
      * Checks if the language is allowed in Frontend, if not, check if there is valid BE user
-     *
-     * @param BackendUserAuthentication|null $user
      */
-    protected function isLanguageEnabled(SiteLanguage $language, BackendUserAuthentication $user = null): bool
+    protected function isLanguageEnabled(SiteLanguage $language, ?BackendUserAuthentication $user = null): bool
     {
         // language is hidden, check if a possible backend user is allowed to access the language
         if ($language->enabled() || ($user instanceof BackendUserAuthentication && $user->checkLanguageAccess($language->getLanguageId()))) {
diff --git a/typo3/sysext/frontend/Classes/Middleware/SiteResolver.php b/typo3/sysext/frontend/Classes/Middleware/SiteResolver.php
index 169b9b54ef920b603b3179e5d4dc981070d00b81..88f0e5f54715113cb8386b924cde094617be26e4 100644
--- a/typo3/sysext/frontend/Classes/Middleware/SiteResolver.php
+++ b/typo3/sysext/frontend/Classes/Middleware/SiteResolver.php
@@ -35,14 +35,8 @@ use TYPO3\CMS\Core\Site\Entity\SiteLanguage;
  */
 class SiteResolver implements MiddlewareInterface
 {
-    /**
-     * @var SiteMatcher
-     */
-    protected $matcher;
-
-    public function __construct(SiteMatcher $matcher)
+    public function __construct(protected readonly SiteMatcher $matcher)
     {
-        $this->matcher = $matcher;
     }
 
     /**
diff --git a/typo3/sysext/frontend/Classes/Middleware/StaticRouteResolver.php b/typo3/sysext/frontend/Classes/Middleware/StaticRouteResolver.php
index ca29d356d9388a2b6a99923fac798f38e721bc32..b37f75fdcb4376274b2760e16db15ef85f9f40f5 100644
--- a/typo3/sysext/frontend/Classes/Middleware/StaticRouteResolver.php
+++ b/typo3/sysext/frontend/Classes/Middleware/StaticRouteResolver.php
@@ -35,22 +35,10 @@ use TYPO3\CMS\Core\Site\Entity\Site;
  */
 class StaticRouteResolver implements MiddlewareInterface
 {
-    /**
-     * @var RequestFactory
-     */
-    protected $requestFactory;
-
-    /**
-     * @var LinkService
-     */
-    protected $linkService;
-
     public function __construct(
-        RequestFactory $requestFactory,
-        LinkService $linkService
+        protected readonly RequestFactory $requestFactory,
+        protected readonly LinkService $linkService
     ) {
-        $this->requestFactory = $requestFactory;
-        $this->linkService = $linkService;
     }
 
     /**
@@ -58,7 +46,7 @@ class StaticRouteResolver implements MiddlewareInterface
      */
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
     {
-        if (($site = $request->getAttribute('site', null)) instanceof Site &&
+        if (($site = $request->getAttribute('site')) instanceof Site &&
             ($configuration = $site->getConfiguration()['routes'] ?? null)
         ) {
             $path = ltrim($request->getUri()->getPath(), '/');
@@ -127,9 +115,6 @@ class StaticRouteResolver implements MiddlewareInterface
         return [$content, $contentType];
     }
 
-    /**
-     * @throws InvalidRouteArgumentsException
-     */
     protected function getPageUri(ServerRequestInterface $request, Site $site, array $urlParams): string
     {
         $parameters = [];
diff --git a/typo3/sysext/frontend/Classes/Middleware/TimeTrackerInitialization.php b/typo3/sysext/frontend/Classes/Middleware/TimeTrackerInitialization.php
index 8915353776d4e9a541989c0a64bd7fc7aab5737f..f644fc7e68309b85c056c3a15a60f897598fe934 100644
--- a/typo3/sysext/frontend/Classes/Middleware/TimeTrackerInitialization.php
+++ b/typo3/sysext/frontend/Classes/Middleware/TimeTrackerInitialization.php
@@ -31,14 +31,8 @@ use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
  */
 class TimeTrackerInitialization implements MiddlewareInterface
 {
-    /**
-     * @var TimeTracker
-     */
-    protected $timeTracker;
-
-    public function __construct(TimeTracker $timeTracker)
+    public function __construct(protected readonly TimeTracker $timeTracker)
     {
-        $this->timeTracker = $timeTracker;
     }
 
     /**