title: Expected Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS, got ','
body: <p>It's about Doctrine and the <code>TIMESTAMPDIFF</code> function from the <a href="https://github.com/orocrm/doctrine-extensions" rel="nofollow">Oro Doctrine Extensions</a> library.</p>
  
  <p>Some code:</p>
  
  <pre><code>    $qb = $em-&gt;createQueryBuilder();
      $totalLogedTime  = $qb
                  -&gt;select('SUM(TIMESTAMPDIFF(MINUTE, ulr.logedIn, ulr.logedOut)) as sum')
                  -&gt;from('SDUserBundle:UserLoginRecord', 'ulr')
                  -&gt;where ...
  </code></pre>
  
  <p>config.yml</p>
  
  <pre><code>            dql:
                  string_functions:
                      array_to_string: ITDoors\CommonBundle\DQL\ArrayToStringDQL
                      array: ITDoors\CommonBundle\DQL\ArrayDQL
                      select_next_handling_message_date: SD\CommonBundle\DQL\SelectNextHandlingMessageDateDQL
                      cast: Oro\ORM\Query\AST\Functions\Cast
                  datetime_functions:
                      date:  Oro\ORM\Query\AST\Functions\SimpleFunction
                  numeric_functions:
                      dayofyear: Oro\ORM\Query\AST\Functions\SimpleFunction
                      year: Oro\ORM\Query\AST\Functions\SimpleFunction
                      month: Oro\ORM\Query\AST\Functions\SimpleFunction
                      day: Oro\ORM\Query\AST\Functions\SimpleFunction
                      timestampdiff: Oro\ORM\Query\AST\Functions\SimpleFunction
                      date: Oro\ORM\Query\AST\Functions\SimpleFunction
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>    [Syntax Error] line 0, col 31: Error: Expected Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS, got ','
  </code></pre>
  
  <p>DQL:</p>
  
  <pre><code>SELECT SUM(TIMESTAMPDIFF(MINUTE, ulr.logedIn, ulr.logedOut)) FROM SDUserBundle:UserLoginRecord ulr WHERE ulr.user_id = 353 AND ulr.logedIn &gt; :start AND ulr.logedOut &lt; :end
                                 ^ - col 31
  </code></pre>
  
  <p>What's wrong? Thanks.</p>