[BUGFIX] Reset singletons in Extbase command 85/23885/2
authorAlexander Stehlik <alexander.stehlik@googlemail.com>
Wed, 18 Sep 2013 06:42:22 +0000 (08:42 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 23 Sep 2013 20:11:41 +0000 (22:11 +0200)
This patch fixes the handleRequest() method signature of
the Cli request handler by returning the response object
like it is expected by the RequestHandlerInterface.

When the request is returned the Bootstrap process will
reset the singletons which includes persisting of any
changed objects.

Resolves: #52092
Releases: 6.2
Change-Id: I78a507ab5b68ad67a85bf4a914494b39ea1407e1
Reviewed-on: https://review.typo3.org/23885
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/extbase/Classes/Mvc/Cli/RequestHandler.php

index 96011a3..4881abf 100644 (file)
@@ -58,7 +58,7 @@ class RequestHandler implements \TYPO3\CMS\Extbase\Mvc\RequestHandlerInterface {
        /**
         * Handles the request
         *
-        * @return void
+        * @return \TYPO3\CMS\Extbase\Mvc\ResponseInterface
         */
        public function handleRequest() {
                $commandLine = isset($_SERVER['argv']) ? $_SERVER['argv'] : array();
@@ -67,6 +67,7 @@ class RequestHandler implements \TYPO3\CMS\Extbase\Mvc\RequestHandlerInterface {
                $response = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
                $this->dispatcher->dispatch($request, $response);
                $response->send();
+               return $response;
        }
 
        /**