77477[TASK] Avoid last usage of GU::_GPmerged() and deprecate
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Stefan Bürk +1
- Christian Kuhn +1
-
Verified V +2 Done
- Benni Mack +2
- Stefan Bürk +1
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 6
- typo3/sysext/core/Classes/Utility/GeneralUtility.php+6 −0
- typo3/sysext/core/Documentation/Changelog/12.2/Deprecation-99615-GeneralUtilityGPMerged.rst4new+62 −0
- typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php+0 −32
- typo3/sysext/core/Tests/UnitDeprecated/Utility/GeneralUtilityTest.phpnew+53 −0
- typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php2+24 −5
- typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php+7 −0
Review log 1923
-
Anja Leichsenring uploaded patch set 1 01/18/23, 15:40
-
Christian Kuhn commented on patch set 1 CR -1 01/18/23, 15:45
on it.Deprecation-99615-GeneralUtilityGPMerged.rst:42let's add a code example here. there should be plenty in the core and it should be easy to give a one-liner example that is php warning free for people to easily copy&paste as boilerplate. -
Christian Kuhn uploaded patch set 2
CR -101/18/23, 16:18 -
Christian Kuhn commented on patch set 1 CR -1 01/18/23, 16:18
Deprecation-99615-GeneralUtilityGPMerged.rst:42ReplyDone -
core-ci voted on patch set 2 V -1 01/18/23, 16:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36121
-
Christian Kuhn uploaded patch set 3
V -101/18/23, 16:37 -
core-ci voted on patch set 3 V +1 01/18/23, 16:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36126
-
Christian Kuhn voted on patch set 3 V +1 CR +1 01/18/23, 17:13
-
Stefan Bürk commented on patch set 3 01/18/23, 17:42
Deprecation-99615-GeneralUtilityGPMerged.rst:59Current example is more the replacement for `GU::$_GP()` and not `GU::_GPmerged()` ... However, do not get really the old code really in `_GPMerged()` .. that expected the "parameter" to be an array too and so on ... This one do either return GET only if not set as POST, and if both not set an empty array. No merge like in the deprectaded method. I guess a more matching example would be something like: ```php $getMergedWithPost = array_replace_recursive( (array)($request->getParsedBody()['tx_scheduler'] ?? []), (array)($request->getQueryParams()['tx_scheduler'] ?? []) ); ``` which is still not fully correct. Or am I wrong here ?AbstractPlugin.php:1367This should at least get a big bold @todo to refactor this to something relying on "request" object. -
Benni Mack voted on patch set 3 CR +1 01/18/23, 17:43
-
Christian Kuhn commented on patch set 3 01/18/23, 18:25
AbstractPlugin.php:1367ReplyNah. AbstractPlugin is legacy as stated in the class comment: "@internal This class is not maintained anymore and may be removed in future versions." Should be enough to go with the implementation below. -
Anja Leichsenring uploaded patch set 4
CR +1V +101/18/23, 18:31 -
Anja Leichsenring commented on patch set 4 01/18/23, 18:32
Deprecation-99615-GeneralUtilityGPMerged.rst:59ReplyDone -
core-ci voted on patch set 4 V +1 01/18/23, 18:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36141
-
Benni Mack voted on patch set 4 V +1 CR +1 01/18/23, 19:44
-
Stefan Bürk voted on patch set 4 V +1 CR +1 01/18/23, 19:45
-
Benni Mack commented on patch set 5
CR +1V +101/18/23, 19:46Published edit on patch set 4. -
Benni Mack voted on patch set 5 V +1 CR +1 01/18/23, 19:46
-
Stefan Bürk voted on patch set 5 V +1 CR +1 01/18/23, 19:46
-
core-ci voted on patch set 5 V +1 01/18/23, 19:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36144
-
Christian Kuhn voted on patch set 5 V +1 CR +1 01/18/23, 20:39
-
Benni Mack voted on patch set 5 V +2 CR +2 01/18/23, 20:39
-
Benni Mack merged patch set 6 01/18/23, 20:39