-
Notifications
You must be signed in to change notification settings - Fork 0
add in envvar ability to hackyness #1
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
base: stable-symfony-2.8
Are you sure you want to change the base?
Conversation
| 'database_host' => $_SERVER['SYMFONY__DB__HOST'], | ||
| 'database_user' => $_SERVER['SYMFONY__DB__USER'], | ||
| 'database_password' => $_SERVER['SYMFONY__DB__PASSWORD'], | ||
| 'database_name' => $_SERVER['APPLICATOIN_ENV'], |
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.
Typo here
| $file = file_get_contents($documentRoot.'/app/config/parameters.yml'); | ||
| $configParams = Yaml::parse($file); | ||
| // load db configuration, NOTE: This is a hack! (made hackier by Mike M) | ||
| if(isset($_SERVER['SYMFONY__DB__HOST']) && isset($_SERVER['SYMFONY__DB__USER']) && isset($_SERVER['SYMFONY__DB__PASSWORD']) && isset($_SERVER['APPLICATOIN_ENV']) && isset($_SERVER['SYMFONY__SAML__KEY__PASS'])) { |
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.
Typo here in APPLICATION_ENV
| $file = file_get_contents($documentRoot.'/app/config/parameters.yml'); | ||
| $configParams = Yaml::parse($file); | ||
| // load db configuration, NOTE: This is a hack! (made hackier by Mike M) | ||
| if(isset($_SERVER['SYMFONY__DB__HOST']) && isset($_SERVER['SYMFONY__DB__USER']) && isset($_SERVER['SYMFONY__DB__PASSWORD']) && isset($_SERVER['APPLICATOIN_ENV']) && isset($_SERVER['SYMFONY__SAML__KEY__PASS'])) { |
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.
isset() can take multiple arguments and will only return true if all of the arguments are set, it can shorten the line
This should slighyl improve this hack by allowing us to utilize the environment vars we'll be setting for the EB containers, as well as maintaining backwards compatibility with the existing method of pulling in the hard coded file parameters.yml