Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Doctrine] resolve:DATABASE_URL Doesn't Work #17686

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

Closed
miqrogroove opened this issue Jan 7, 2023 · 2 comments
Closed

[Doctrine] resolve:DATABASE_URL Doesn't Work #17686

miqrogroove opened this issue Jan 7, 2023 · 2 comments
Labels

Comments

@miqrogroove
Copy link
Contributor

miqrogroove commented Jan 7, 2023

There are many threads about modifying doctrine.yaml to force it to work with urlencoded passwords.

In my case, it was necessary in order to fix the "parameter must be defined" error.

Is this a documentation issue?

symfony/skeleton#40 (comment)

https://stackoverflow.com/a/50346919

https://stackoverflow.com/a/68631870

@alamirault
Copy link
Contributor

Thanks for reporting.

There is already a caution block here https://symfony.com/doc/current/doctrine.html#configuring-the-database
Do you think is enough ?

(I created PR in order to improve target conf)

@miqrogroove
Copy link
Contributor Author

miqrogroove commented Jan 8, 2023

The caution block is contradictory and might be part of the problem. My reading of this is:

  • Configuring the Database
  • You must customize the .env file
  • You must supply a db_user:db_password string in a URL
  • You must urlencode the password
  • The URL won't work unless the resolve: token is removed from the doctrine.yaml file because it is incompatible with these instructions.

So I would propose two ways to make this easier to understand.

Instead of saying "in this case ... to avoid errors", which sounds like a rare and unusual corner case, move that step to the top of the Configuring the Database explanation. Step 1: You must remove the resolve: token from the doctrine.yaml to make it compatible with database connection strings. To me, that sounds much more practical.

Another way of saying this better: First Caution: You must urlencode passwords in URLs. Second Caution (separate block): You must either supply a password with no special characters, or you must modify the doctrine.yaml file as follows....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants