Target entity resolver for DQL
Since we have target entity resolver in doctrine this class check is not enought. To gain interface resolution it is better to add interface check in addition to class_check here.
This commit is contained in:
parent
b341d5c453
commit
e390dbd5ba
@ -996,9 +996,7 @@ class Parser
|
||||
*/
|
||||
private function validateAbstractSchemaName($schemaName)
|
||||
{
|
||||
$exists = class_exists($schemaName, true);
|
||||
|
||||
if (! $exists) {
|
||||
if (! (class_exists($schemaName, true) || interface_exists($schemaName, true))) {
|
||||
$this->semanticalError("Class '$schemaName' is not defined.", $this->lexer->token);
|
||||
}
|
||||
}
|
||||
@ -1814,7 +1812,7 @@ class Parser
|
||||
$this->match(Lexer::T_OPEN_CURLY_BRACE);
|
||||
$this->match(Lexer::T_IDENTIFIER);
|
||||
|
||||
$field = $this->lexer->token['value'];
|
||||
$field = $this->lexer->token['value'];
|
||||
|
||||
// First field in partial expression might be embeddable property
|
||||
while ($this->lexer->isNextToken(Lexer::T_DOT)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user