Skip to content

Commit

Permalink
Allow doctrine/lexer 2
Browse files Browse the repository at this point in the history
It is still possible to avoid a BC-break while doing so.
  • Loading branch information
greg0ire committed Dec 10, 2022
1 parent 8708a31 commit 83fc5d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -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": {
Expand Down
8 changes: 8 additions & 0 deletions lib/Doctrine/Common/Annotations/DocLexer.php
Expand Up @@ -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;
}
}

0 comments on commit 83fc5d1

Please sign in to comment.