[BUGFIX] Broken tests due to modified PostProcessor constructor 14/30714/2
authorOliver Hader <oliver@typo3.org>
Fri, 13 Jun 2014 13:03:49 +0000 (15:03 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Fri, 13 Jun 2014 14:02:01 +0000 (16:02 +0200)
Issue #31951 introduced a breaking change in changing the order
of constructor arguments in the form PostProcessor. This could
have been avoided since new TypoScriptFactory object is and was
a singleton.

Resolves: #59549
Releases: 6.2
Change-Id: I1134d4440437e9fe03129241e63c0f0004712176
Reviewed-on: https://review.typo3.org/30714
Reviewed-by: Marc Bastian Heinrichs
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/form/Classes/Controller/FormController.php
typo3/sysext/form/Classes/PostProcess/PostProcessor.php

index fe097da..7ddcab3 100644 (file)
@@ -238,7 +238,7 @@ class FormController {
                        $postProcessorTypoScript = $this->typoscript['postProcessor.'];
                }
                /** @var $postProcessor \TYPO3\CMS\Form\PostProcess\PostProcessor */
-               $postProcessor = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Form\\PostProcess\\PostProcessor', $form, $this->typoscriptFactory, $postProcessorTypoScript);
+               $postProcessor = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Form\\PostProcess\\PostProcessor', $form, $postProcessorTypoScript);
                $content = $postProcessor->process();
                $this->requestHandler->destroySession();
                return $content;
index ff98db1..0e119aa 100644 (file)
@@ -45,12 +45,11 @@ class PostProcessor {
         * Constructor
         *
         * @param \TYPO3\CMS\Form\Domain\Model\Form $form Form domain model
-        * @param \TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory $typoscriptFactory
         * @param array $typoScript Post processor TypoScript settings
         */
-       public function __construct(\TYPO3\CMS\Form\Domain\Model\Form $form, \TYPO3\CMS\Form\Domain\Factory\TypoScriptFactory $typoscriptFactory, array $typoScript) {
+       public function __construct(\TYPO3\CMS\Form\Domain\Model\Form $form, array $typoScript) {
                $this->form = $form;
-               $this->typoscriptFactory = $typoscriptFactory;
+               $this->typoscriptFactory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Form\\Domain\\Factory\\TypoScriptFactory');
                $this->typoScript = $typoScript;
        }