typo3scan icon indicating copy to clipboard operation
typo3scan copied to clipboard

PHP 8 compatibility

Open kevin-appelt opened this issue 3 years ago • 3 comments

It would be great if the scanner also supports PHP 8. I haven't dived deeper yet but the "biggest" problem is that "match" is a reserved keyword in PHP 8 which leads to the following error:

Parse error: syntax error, unexpected token "::", expecting "(" in phar:///var/www/html/vendor/michielroos/typo3scan/typo3scan/vendor/typo3/cms-scanner/src/Scanner.php on line 25
PHP Parse error:  syntax error, unexpected token "::", expecting "(" in phar:///var/www/html/vendor/michielroos/typo3scan/typo3scan/vendor/typo3/cms-scanner/src/Scanner.php on line 25

kevin-appelt avatar Jan 19 '22 07:01 kevin-appelt

Sounds like a minor change. Could be renamed to $theMatch or something.

Tuurlijk avatar Jan 19 '22 15:01 Tuurlijk

i get the same problem running the following:

php typo3scan.phar scan --target 11 extensions/my_extension

PHP Parse error: syntax error, unexpected token "::", expecting "(" in phar://D:/Programming/MyPath/typo3scan.phar/vendor/typo3/cms-scanner/src/Scanner.php on line 25

Is there any plan to fix this?

AKaravas avatar May 04 '22 10:05 AKaravas

Suggested fix for now: use ^7.0 for PHP. Then extend this to ^7.0 || ^8.0 once support for PHP 8 is added.

mbrodala avatar May 04 '22 10:05 mbrodala