sabbelasichon/typo3-rector

[BUG] UseServerRequestInsteadOfGeneralUtilityGetRector might introduce notices

Closed this issue · 1 comments

Minimal PHP Code Causing Issue

-        $post = GeneralUtility::_POST('xxx');
+        $post = $this->request->getParsedBody()['xxx'];

Applied rules

UseServerRequestInsteadOfGeneralUtilityGetRector
UseServerRequestInsteadOfGeneralUtilityPostRector

Expected Behaviour

I guess $post = $this->request->getParsedBody()['xxx'] ?? null; would be tter

Package Version

2.10.2

PHP Version

8.3.0

TYPO3 Version

13.4

Notes

see #4181 and #4182

We actually had this with a null coalesce behavior bevor and then removed it again. I fixed it now properly.