From f5d4db7d9c989a1b8f10d8ff1ea2e9f5d6020367 Mon Sep 17 00:00:00 2001 From: SimonHeimberg Date: Tue, 22 Nov 2016 09:03:01 +0100 Subject: [PATCH] Report that FROM and JOIN do not support Subqueries --- lib/Doctrine/ORM/Query/Parser.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index a06cd83a6..c63148654 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -1715,6 +1715,9 @@ class Parser */ public function RangeVariableDeclaration() { + if ($this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) && $this->lexer->glimpse()['type'] === Lexer::T_SELECT) { + $this->semanticalError('Subquery is not supported here', $this->lexer->token); + } $abstractSchemaName = $this->AbstractSchemaName(); $this->validateAbstractSchemaName($abstractSchemaName);