-
-
Notifications
You must be signed in to change notification settings - Fork 496
[DoctrineBundle] resolve parameters inside DATABASE_URL #204
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request passes validation.
Actually I don't like I wish we could revert back to use 4 env variables as in Symfony 3.3 (that's what I did for now in my project to avoid specifying DB credentials in 2 different formats). |
Could we fix PdoSessionHandler to support this new DSN format instead? |
The DSN format isn't new, but isn't standard PDO DSN either. Not sure how to do this without breaking BC, but I see 2 options:
pros: PdoSessionHandler works with Doctrine bundle not installed
pros: you will see DB queries made by PdoSessionHandler in Web Profiler P.S. |
@aik099 please open an issue if you want to discuss this, that's another topic. |
Created #206. |
Will the |
We need to decide what to do here. I think we should probably just merge as is and let 3.3 users behind. |
I don't see any other option. We could temporarily (until 3.4 is released) add a comment above this line:
|
Problem is that cache:clear will fail immediately as the syntax is not valid in 3.3. |
So? |
@@ -1,6 +1,6 @@ | |||
doctrine: | |||
dbal: | |||
url: '%env(DATABASE_URL)%' | |||
url: '%env(resolve:DATABASE_URL)%' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment for people using 3.3? Something like # If you are using Symfony 3.3, remove the resolve: prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request passes validation.
Not ready to merge yet, because this relies on DI >=3.4.
If we want to allow this with 3.3, we might patch DoctrineBundle.
But before doing so, what about just moving to require >=3.4 for all Symfony components?
Any other idea?