I know this question is very old, but I answer this question for those who have the same error.
you just need to add the code below as a file called "SecToTime.php", as shown below.
YourProjectName \ Library \ Doctrine \ DoctrineExtensions \ Query \ MySql \ SecToTime.php
And put the code below into the above file named "SecToTime.php".
<?php namespace DoctrineExtensions\Query\Mysql; use Doctrine\ORM\Query\AST\Functions\FunctionNode, Doctrine\ORM\Query\Lexer; class SecToTime extends FunctionNode { public $time; public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) { return 'SEC_TO_TIME(' . $sqlWalker->walkArithmeticPrimary($this->time) . ')'; } public function parse(\Doctrine\ORM\Query\Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->time = $parser->ArithmeticPrimary(); $parser->match(Lexer::T_CLOSE_PARENTHESIS); } }
you need to add the above file name to your doctrine.php file for future reference. I hope you know how to add this.
If you have any questions, feel free to ask.
source share