[TASK] Extract _GP call from TSFE->initializeSearchWordData 81/58081/2
authorBenni Mack <benni@typo3.org>
Thu, 30 Aug 2018 09:14:44 +0000 (11:14 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 30 Aug 2018 12:04:29 +0000 (14:04 +0200)
commit014e32fb0232c9db1bdae669a7f29f6c5905004f
tree9eea7e4c41d27a92f63d3e495567eb76cbe19b9f
parent0e2756aabfbec814436a14ac67f412953d451d54
[TASK] Extract _GP call from TSFE->initializeSearchWordData

In order to centralize usages regarding global magic ($_GET/$_POST) within
TypoScriptFrontendController, the method initializeSearchWordData()
is renamed to something useful, and is now handed in the variable from
GeneralUtility::_GP() and also gets some unit tests, making this method
also notice-free, as a side-effect.

This pre-patch allows to inject something else (PSR-7 request) in the future
without ever touching this method.

Resolves: #86035
Releases: master
Change-Id: I3db94dd3ce23de8d2f8772067ec15d38d0f7cf64
Reviewed-on: https://review.typo3.org/58081
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php