[TASK] Remove unused Bootstrap dependency from frontend request handler 95/55795/6
authorBenjamin Franzke <bfr@qbus.de>
Mon, 19 Feb 2018 13:05:36 +0000 (14:05 +0100)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 19 Feb 2018 20:31:11 +0000 (21:31 +0100)
Due to moving BE user authentication to a middleware, the Bootstrap
instance is no longer needed in the frontend request handler.

As the backend request handler is free of a Bootstrap dependency as well,
we can also remove the Bootstrap injection in Http\AbstractApplication.

The installer and legacy request handlers are unaffected:
 * The installer application instantiates the request handler on its own.
 * Legacy request handlers are dispatched by the legacy request handler
   middleware which keeps passing in a Bootstrap instance

Releases: master
Resolves: #83961
Related: #83959
Change-Id: I85552b4b1734cdf75d96395ae7610ab19f0bf29c
Reviewed-on: https://review.typo3.org/55795
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/core/Classes/Http/AbstractApplication.php
typo3/sysext/frontend/Classes/Http/RequestHandler.php

index d51514f..d0f99c2 100644 (file)
@@ -19,7 +19,6 @@ use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\RequestHandlerInterface;
 use TYPO3\CMS\Core\Core\ApplicationInterface;
-use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -86,7 +85,7 @@ class AbstractApplication implements ApplicationInterface
      */
     protected function handle(ServerRequestInterface $request): ResponseInterface
     {
-        $requestHandler = GeneralUtility::makeInstance($this->requestHandler, Bootstrap::getInstance());
+        $requestHandler = GeneralUtility::makeInstance($this->requestHandler);
         $dispatcher = $this->createMiddlewareDispatcher($requestHandler);
 
         return $dispatcher->handle($request);
index 0a64033..d2e6567 100644 (file)
@@ -19,7 +19,6 @@ use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Server\RequestHandlerInterface as PsrRequestHandlerInterface;
 use TYPO3\CMS\Backend\FrontendBackendUserAuthentication;
-use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\FrontendEditing\FrontendEditingController;
 use TYPO3\CMS\Core\Http\NullResponse;
 use TYPO3\CMS\Core\Http\RequestHandlerInterface;
@@ -41,28 +40,12 @@ use TYPO3\CMS\Frontend\Page\PageGenerator;
 class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterface
 {
     /**
-     * Instance of the current TYPO3 bootstrap
-     * @var Bootstrap
-     */
-    protected $bootstrap;
-
-    /**
      * Instance of the timetracker
      * @var TimeTracker
      */
     protected $timeTracker;
 
     /**
-     * Constructor handing over the bootstrap and the original request
-     *
-     * @param Bootstrap $bootstrap
-     */
-    public function __construct(Bootstrap $bootstrap)
-    {
-        $this->bootstrap = $bootstrap;
-    }
-
-    /**
      * Handles a frontend request
      *
      * @param ServerRequestInterface $request