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
Environment support #39
Comments
Hi, I was thinking of some sort of integration with phpdotenv but I'm not quite sure how. Do you have any examples of how you'd like to use it? |
That's how it works with that Node module: custom-environment-variables.yml db:
# For Codeship
username: PG_USER
password: PG_PASSWORD
# For Heroku
url: DATABASE_URL Then, my |
This seems a bit overkill for this package, because (AFAIK) we'll have to check the value of each configuration value to see if it matches an environment variable. I hope I'm wrong and there's a better way of doing it. |
Just an update, this can be done in PHP using the dotenv package - still not sure about other file formats though |
If you use php as config file, you can load env variables like this: <?php
return [
'some_config_parameter' => getenv('SOME_ENV_PARAMETER')
]; |
It could be interesting to have something like Symfony, reading the .env file and filling variables. db:
driver: mariadb
username: '%env(DB_USERNAME)%'
password: '%env(DB_PASSWORD)%' |
…it/phpunit-8.0.4 Bump phpunit/phpunit from 8.0.3 to 8.0.4
Hey,
I'm a Node.js developer which needs to program an app using PHP for college! So I thought of using this config manager, which is very alike with node-config.
But I want to override a few options with environment variables, because of Heroku, for example. node-config allows me to do this via an special
custom-environment-variables
configuration.What do you think of implementing something similar in your amazing project?
The text was updated successfully, but these errors were encountered: