Description
The cookbook page on registering custom DQL functions (http://symfony.com/doc/2.2/cookbook/doctrine/custom_dql_functions.html) contains a config snippet showing how to add functions.
While it might benefit from a little more exposition, my main concern is that the sample configuration doesn't work if you apply it to the default configuration. The cookbook page suggests using
# app/config/config.yml
doctrine:
orm:
# ...
entity_managers:
default:
# ...
dql:
# … new functions here …
however, this causes an error complaining that auto_mapping
is not a valid configuration parameter. (The default config sets doctrine.orm.auto_mapping: true.)
A better way (rather, a way that works with the fewest changes from the default config) to add new functions might be something along the lines of:
# app/config/config.yml
doctrine:
orm:
# ...
dql:
# … new functions here …
Before I submit a PR changing that, is there a particular reason we would want to keep the existing version of the configuration, showing specifying the configuration on a per-manager basis, or can we just omit that, and assume that someone who needs the more advanced case of creating per-manager config would know to change the configuration as appropriate?