New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clearify shorten configuration syntax #299
Comments
The error messages are coming from the Config component. They cannot be customized |
We can add some custom validation and use |
We can now also add information to the error messages using the |
Closing here as this can't be changed since it's the config component handling things (and because the issue hasn't been touched in more than 4 years). |
The shorten syntax for
connections
andentity_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):
You get this error message:
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:
/cc @weaverryan
The text was updated successfully, but these errors were encountered: