Commit 4707426f authored by Benni Mack's avatar Benni Mack
Browse files

[FOLLOWUP][FEATURE] Introduce Request/Response based on PSR-7

Make install tool work again.

Resolves: #67558
Releases: master
Change-Id: Ia6630c705cbcd34fda95f797071cca56b19954b9
Reviewed-on: http://review.typo3.org/41130


Reviewed-by: Benni Mack's avatarBenjamin Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenjamin Mack <benni@typo3.org>
parent 9082bf1e
......@@ -289,8 +289,9 @@ class Bootstrap {
*
* @return Bootstrap
* @throws \TYPO3\CMS\Core\Exception
* @internal This is not a public API method, do not use in own extensions
*/
protected function handleRequest() {
public function handleRequest() {
// Build the Request object
$request = \TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals();
......
......@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Install\Http;
* The TYPO3 project - inspiring people to share!
*/
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Core\Core\Bootstrap;
use TYPO3\CMS\Core\Core\RequestHandlerInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......@@ -43,10 +44,11 @@ class RequestHandler implements RequestHandlerInterface {
* Handles an install tool request
* Execute 'tool' or 'step' controller depending on install[controller] GET/POST parameter
*
* @param ServerRequestInterface $request
* @return void
*/
public function handleRequest() {
$getPost = GeneralUtility::_GP('install');
public function handleRequest(ServerRequestInterface $request) {
$getPost = !empty($request->getQueryParams()['install']) ? $request->getQueryParams()['install'] : $request->getParsedBody()['install'];
switch ($getPost['controller']) {
case 'tool':
$controllerClassName = \TYPO3\CMS\Install\Controller\ToolController::class;
......@@ -65,9 +67,10 @@ class RequestHandler implements RequestHandlerInterface {
* please note that both checks are needed, as when in "failsafe" mode, the TYPO3_REQUESTTYPE is not
* necessarily set at this point.
*
* @param ServerRequestInterface $request
* @return bool Returns always TRUE
*/
public function canHandleRequest() {
public function canHandleRequest(ServerRequestInterface $request) {
return TRUE;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment