1
0
mirror of synced 2025-03-05 20:36:15 +03:00

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:
oprokidnev 2015-11-27 16:00:56 +05:00 committed by Marco Pivetta
parent b341d5c453
commit e390dbd5ba

View File

@ -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)) {