2

I'm attempting to register a set of third-party DQL functions in a Symfony 3 app. I've followed Symfony's docs and have a config.yml with (among other fields):

doctrine:
    orm:
        dql:
            string_functions:
                to_tsquery: OpsWay\Doctrine\ORM\Query\AST\Functions\ToTsquery
                to_tsvector: OpsWay\Doctrine\ORM\Query\AST\Functions\ToTsvector
                ts_match_op: OpsWay\Doctrine\ORM\Query\AST\Functions\TsMatch

However, when I run my code that calls these functions in the DQL, I get an error of Class '\OpsWay\Doctrine\ORM\Query\AST\Functions\TsMatch' not found. I've guaranteed that there are no misspellings and that the files are installed via Composer. I can even successfully Cmd+Click in PHPStorm to get to the class from the config.yml. Is there something that I'm missing to get these functions registered?

1
  • Update: For whatever reason, if I copied the contents of these files into my AppBundle and changed the namespace, it worked. Really strange, and not ideal, but it's served as a workaround for now. Commented Aug 8, 2016 at 16:42

1 Answer 1

1

The namespace starts with Opsway but not OpsWay.

Opsway\Doctrine\ORM\Query\AST\Functions

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.