Doctrine extensions and user defined functions

Install doctrine extensions package to have access to a selection of user defined database functions.

Install DoctrineExtensions package:

composer require beberlei/DoctrineExtensions

Enable required functions:

# config/packages/doctrine.yaml
doctrine:
    orm:
        # ...
        dql:
            numeric_functions:
                acos: DoctrineExtensions\Query\Mysql\Acos
                cos: DoctrineExtensions\Query\Mysql\Cos
                point: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Point
                radians: DoctrineExtensions\Query\Mysql\Radians
                sin: DoctrineExtensions\Query\Mysql\Sin
                x: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\X
                y: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Y
            string_functions:
                match: DoctrineExtensions\Query\Mysql\MatchAgainst

For more information check out the documentation of DoctrineExtensions package and Doctrine DQL User Defined Functions.