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
.env
: Make MAILER_URL and DATABASE_URL consistent
#30316
Comments
Well, the issue is that these URLs are interpreted by different systems which follow different formats. To be able to have a universal format would mean that we would have to somewhere transform them which will probably sooner or later lead to confusion when the format used here does not match the format used in the documentation of the used libraries. |
OK, thanks, so it's not done centrally ;-) What about opening an issue at Doctrine bundle or Swiftmailer bundle to change the format? Which format would you say is better: Any why didn't the guys who invented this, make it consistent in the first place? ;-) |
because separate individuals don't share the same brain ;) If you think this should be done, I think you should send a PR. That's the best way to prove your point, as always in OSS ;) |
I updated the Swift Mailer docs about the special characters: symfony/symfony-docs#11054 And I suggested to change the syntax in Swift Mailer Bundle: symfony/swiftmailer-bundle#276
So I'm closing this. |
Description
Use either the form
username:password@server
orserver?username=&password=
for all connection url strings in.env
https://symfony.com/doc/current/doctrine.html#configuring-the-database says
whereas https://symfony.com/doc/current/email.html#configuration says
And (weirdly enough), the
.env.dist
file itself contains this example:So I'm suggesting to make it consistent for all!
Besides, how to escape special characters should be explained better. https://symfony.com/doc/current/doctrine.html#configuring-the-database has a dedicated alert box about this, https://symfony.com/doc/current/email.html#configuration just has a comment in the code. So I'd suggest to copy the alert box to the email docs as well. Should I do that?
Is the parsing of the
.env
file done per package or centrally? If centrally, then maybe the escaping question should rather be explained at https://symfony.com/doc/current/components/dotenv.html ?The text was updated successfully, but these errors were encountered: