diff --git a/composer.json b/composer.json index 47971b5cc..e3dbdc5ab 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "require": { "php": "^7.1 || ^8.0", "ext-tokenizer": "*", - "doctrine/lexer": "1.*", + "doctrine/lexer": "2.0.x-dev", "psr/cache": "^1 || ^2 || ^3" }, "require-dev": { diff --git a/lib/Doctrine/Common/Annotations/DocLexer.php b/lib/Doctrine/Common/Annotations/DocLexer.php index f6567c512..e0d517e79 100644 --- a/lib/Doctrine/Common/Annotations/DocLexer.php +++ b/lib/Doctrine/Common/Annotations/DocLexer.php @@ -126,4 +126,12 @@ protected function getType(&$value) return $type; } + + /** @return array{value: int|string, type:string|int|null, position:int} */ + public function peek(): array + { + $token = parent::peek(); + + return (array) $token; + } }