In PHP 8.3 (with Drupal 10), using SonarQube v10.1 I have this following error (and on some other files using constants) and I have no clue why.
13:31:46.475 ERROR: Unable to parse file [file:///builds/project-digital/projects/nova/discovery-cms/src/web/modules/custom/project_resources/src/Export/ExportCustomerService.php] at line 15
13:31:46.475 ERROR: Parse error at line 15 column 24:
5: namespace Drupal\project_resources\Export;
6:
7: use Drupal\Core\Logger\LoggerChannelFactoryInterface;
8: use Drupal\project_customer_service\Entity\CustomerService;
9: use Drupal\project_static_storage\Manager\StorageFilesManager;
10: use Drupal\project_utils\Bar;
11: use Drupal\project_utils\Foo;
12:
13: class ExportCustomerService {
14:
15: private const string DEFAULT_TITLE = 'customer-service';
^
I did execute the command sonar-scanner
with --debug
and no extra info on the Parse error which is too bad.