Task #98321
Updated by Oliver Hader over 1 year ago
I'm pretty sure there are still a bunch of "undefined array key" warnings hidden in the TYPO3 core when used in combination with PHP 8. To identify and address those issues, I created a PsalmPHP plugin tweaking some static code analysis topics (e.g. static/self references, or ignoring @$GLOBALS@) for creating a list with potential code locations that could be enhanced. This list is quite long and some aspects might feel okayish... Anyway, I'm just posting the results as TXT and SARIF file. h3. Processing <pre> # process with max. 1 thread bin/psalm --memory-limit=8G --threads=1 --no-cache \ --report=results.sarif --output-format=github # Visual Studio Code SARIF needs special JSON and absolute paths (@sed@ on macOS neeeds `-i ''`, @-i ''@, on Linux just `-i`) @-i@) sed -i '' \ -e 's,\\/,/,g' \ -e's,{"uri":"typo3/,{"uri":"'"$(pwd)"'/typo3/,g' results.sarif </pre> h3. Tools * https://psalm.dev/ * https://marketplace.visualstudio.com/items?itemName=WDGIS.MicrosoftSarifViewer