Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Undefined array key "type" (doctrine/annotations 1.14.0) #6705

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Doctrine/Annotation/Tokens.php
Expand Up @@ -58,7 +58,7 @@ public static function createFromDocComment(PhpToken $input, array $ignoredTags
$index = 0;
$nbScannedTokensToUse = 0;
$nbScopes = 0;
while (null !== $token = $lexer->peek()) {
while ($token = $lexer->peek()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be done. Because doctrine/annotations introduced a breaking change for that.
Question is if the check should be to call empty() or something.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe check for both null and [] ? But perhaps the change introduced in doctrine/annotations was not intentional. Maybe wait to see how they respond.

if (0 === $index && DocLexer::T_AT !== $token['type']) {
break;
}
Expand Down