Skip to content

Commit

Permalink
Fix deprecations from doctrine/lexer
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jun 1, 2023
1 parent 14d1eb5 commit 152f91f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Doctrine/ORM/Query/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ private function isNextAllAnySome(): bool
assert($this->lexer->lookahead !== null);

return in_array(
$this->lexer->lookahead['type'],
$this->lexer->lookahead->type,
[Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME],
true
);
Expand Down Expand Up @@ -978,7 +978,7 @@ public function AbstractSchemaName()
$this->match(Lexer::T_IDENTIFIER);
assert($this->lexer->token !== null);

return $this->lexer->token['value'];
return $this->lexer->token->value;
}

$this->match(Lexer::T_ALIASED_NAME);
Expand All @@ -989,10 +989,10 @@ public function AbstractSchemaName()
'doctrine/orm',
'https://github.com/doctrine/orm/issues/8818',
'Short namespace aliases such as "%s" are deprecated and will be removed in Doctrine ORM 3.0.',
$this->lexer->token['value']
$this->lexer->token->value
);

[$namespaceAlias, $simpleClassName] = explode(':', $this->lexer->token['value']);
[$namespaceAlias, $simpleClassName] = explode(':', $this->lexer->token->value);

return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
}
Expand Down

0 comments on commit 152f91f

Please sign in to comment.