Skip to content

Error parsing typed class constants with php 8.3 #530

Open
@eurosat7

Description

@eurosat7

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions