-
-
Notifications
You must be signed in to change notification settings - Fork 159
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use environment variables for app config #605
Conversation
@@ -1,5 +1,7 @@ | |||
# Default parameters | |||
parameters: | |||
env(APP_SECRET): '%secret%' | |||
env(DATABASE_URL): 'mysql://%database_user%:%database_password%@%database_host%:%database_port%/%database_name%' |
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.
If we have a database URL, we do not need the database_*
parameters anymore, do we?
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.
we need them for backwards compatibility and the install tool
Btw this also means we no longer need to re-compile the container when changing database credentials (which does not apply to the install tool yet though)! 馃槑 |
This concept does not work for the mailer URL though:
|
Ah, it does not work for the database URL, either:
|
The mailer might be an issue because some parameters are optional. But that's not the case for the database, how can |
See #768. |
This allows to use
.env
files for the application configuration, as is best practice in Symfony.FYI
.env
variables, so the Manager would already be able to configure the database connection 馃槑