-
-
Notifications
You must be signed in to change notification settings - Fork 460
Description
The shorten syntax for connections
and entity_managers
in the configuration is truly great. But the current implementation has a very big flawback: The error messages are not clear enough. If you are not aware that there is a shorten version, you'll have a hard time understanding code examples in documentations.
We've had a couple of issues about this in the Symfony docs lately: symfony/symfony-docs#3878, symfony/symfony-docs#3946, symfony/symfony-docs#393
Assume you have this config (which is incorrect since it uses both the expanded and shorten syntax):
doctrine:
orm:
auto_mapping: true
entity_managers:
default:
dql: ...
You get this error message:
Unrecognized options "auto_mapping" under "doctrine.orm"
As if the auto_mapping
option doesn't exists at all.
I propose to improve these error message to include that you already use the expanded version and thus it needs to be placed under the specific entity manager. For instance:
The configuration contains specific entity managers, you should move the "auto_mapping" option to a specific entity manager.
/cc @weaverryan