Skip to content

Undefined constant ArrayShapeNode::KIND_NON_EMPTY_ARRAY #268

@distantnative

Description

@distantnative

I'm running into the following error:

Undefined constant PHPStan\PhpDocParser\Ast\Type\ArrayShapeNode::KIND_NON_EMPTY_ARRAY

on phpstan/phpdoc-parser/src/Parser/TypeParser.php:204.

Reproducible for me with the example code:

$config          = new ParserConfig(usedAttributes: []);
$lexer           = new Lexer();
$constExprParser = new ConstExprParser();
$typeParser     = new TypeParser($config, $constExprParser);
$phpDocParser   = new PhpDocParser($config, $typeParser, $constExprParser);
$tokens          = new TokenIterator($lexer->tokenize('/** @param Lorem $a */'));
return $phpDocParser->parse($tokens);

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