Fix deprecations and code style issues

This commit is contained in:
2024-03-07 15:26:58 +01:00
parent f0dbb17172
commit 1d636f5e9e
38 changed files with 111 additions and 131 deletions

View File

@@ -14,7 +14,6 @@ namespace Chill\MainBundle\Doctrine\DQL;
use Doctrine\ORM\Query\AST\Functions\DateDiffFunction;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\AST\PathExpression;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
@@ -45,17 +44,17 @@ class Extract extends FunctionNode
public function parse(Parser $parser)
{
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(Lexer::T_OPEN_PARENTHESIS);
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
$parser->match(Lexer::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$this->field = $parser->getLexer()->token['value'];
$parser->match(Lexer::T_FROM);
$parser->match(\Doctrine\ORM\Query\TokenType::T_FROM);
// $this->value = $parser->ScalarExpression();
$this->value = $parser->ArithmeticPrimary();
$parser->match(Lexer::T_CLOSE_PARENTHESIS);
$parser->match(\Doctrine\ORM\Query\TokenType::T_CLOSE_PARENTHESIS);
}
}