From b175427043de59762e83dcfb079e29c09d16e62b Mon Sep 17 00:00:00 2001
From: guilhermeblanco <guilhermeblanco@625475ce-881a-0410-a577-b389adb331d8>
Date: Tue, 23 Mar 2010 17:42:34 +0000
Subject: [PATCH] [2.0][DDC-458] Fixed issue with IN () support when providing
 numeric values separated by comma without spaces.

---
 lib/Doctrine/ORM/Query/Lexer.php                           | 2 +-
 tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/Doctrine/ORM/Query/Lexer.php b/lib/Doctrine/ORM/Query/Lexer.php
index ca65213a9..7fe7ecb50 100644
--- a/lib/Doctrine/ORM/Query/Lexer.php
+++ b/lib/Doctrine/ORM/Query/Lexer.php
@@ -124,7 +124,7 @@ class Lexer extends \Doctrine\Common\Lexer
     {
         return array(
             '[a-z_][a-z0-9_\:\\\]*[a-z0-9_]{1}',
-            '(?:[0-9]+(?:[,\.][0-9]+)*)(?:e[+-]?[0-9]+)?',
+            '(?:[0-9]+(?:[\.][0-9]+)*)(?:e[+-]?[0-9]+)?',
             "'(?:[^']|'')*'",
             '\?[1-9][0-9]*|:[a-z][a-z0-9_]+'
         );
diff --git a/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php b/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php
index 8183891e0..9fc1d6024 100644
--- a/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php
+++ b/tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php
@@ -123,6 +123,11 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
     {
         $this->assertValidDql('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id IN (1, 2)');
     }
+ 
+    public function testInExpressionWithoutSpacesSupportedInWherePart()
+    {
+        $this->assertValidDql('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id IN (1,2,3)');
+    }
 
     public function testNotInExpressionSupportedInWherePart()
     {
-- 
2.21.0