Reflection icon indicating copy to clipboard operation
Reflection copied to clipboard

Error parsing typed class constants with php 8.3

Open eurosat7 opened this issue 1 year ago • 0 comments

Ran phpDocumentor as phpdoc.phar with version v3.4.3 on a php 8.3 code base.

fails:

class Something
{
    private const array REPLACEMENT_MAP = [ 'a' => 1 ];
}

works:

class Something
{
    private const REPLACEMENT_MAP = [ 'a' => 1 ];
}

output:

[alert]   Unable to parse file "Something.php", an error was detected: Syntax error, unexpected T_STRING, expecting '=' on line 5

eurosat7 avatar Mar 08 '24 14:03 eurosat7