Hi, according to the following ERROR: Unable to parse file PHP ENUMs SonarQube 9.3 should support PHP 8.1. I have upgraded but still are encountering issues.
Using SonarQube Version 9.4 (build 54424) and sonar-scanner-cli 4.7.0.
The error report states:
ERROR: Unable to parse file [file:///builds/xxxx/Configuration/Internationalization/I18nConfig.php] at line 12
ERROR: Parse error at line 12 column 42:
2: declare(strict_types=1);
3:
4: namespace XX\XX\Configuration\Internationalization;
5:
6: class I18nConfig
7: {
8: /**
9: * @param string $defaultLocale - Default locale of the installation
10: * @param array<string> $supportedLocales - Supported locales of the installation
11: */
12: public function __construct(readonly public string $defaultLocale, readonly public array $supportedLocales)
^
13: {
14: }
15: }
16:
Seems that the readonly
keyword is tripping SonarQube up. Is this a bug or do I need to upgrade something?
Thanks!