Skip to content
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

Deprecate INI/JSON config and add .env file support. #690

Closed
rickbergfalk opened this issue Jun 15, 2020 · 6 comments
Closed

Deprecate INI/JSON config and add .env file support. #690

rickbergfalk opened this issue Jun 15, 2020 · 6 comments

Comments

@rickbergfalk
Copy link
Collaborator

I just ran into this ini bug when setting an ODBC connection string via INI file.

Unfortunately looks like the ini lib is not actively maintained anymore, and I'm not interested in forking and publishing a fixed version myself.

Is JSON enough or should a more human friendly alternative be added in its place? (TOML perhaps? https://github.com/toml-lang/toml)

@elad-eyal
Copy link
Contributor

Are .env files supported ? I tried to look for it online and am under the impression that something needs to be included in code for support. If so it would be good to mention it. I like .env files better than JSON because they are copy-and-paste to deployment env variables. They are pretty much the same as ini files except they use the env variable name instead of the json name, and the connection configrations can't have their own [section]. They are thus a good enough replacement to ini files in my opinion.

@rickbergfalk
Copy link
Collaborator Author

.env files are not supported but they could be. For variables that need a section I've seen other applications use double underscores as a separator (which is how connections are currently defined via environment variables).

I like that .env has comment support too.

If .env file support was adopted... what do you think about removing JSON support?

I like the options, but if JSON were removed it'd allow for documentation to be simplified a lot. This week I've helped troubleshoot 2 malformed JSON files too... something that wouldn't happen if .env was used...

@rickbergfalk
Copy link
Collaborator Author

I should add not only could documentation be simplified, but code to manage the config as well.

@elad-eyal
Copy link
Contributor

I don't think I have a strong opinion.

@rickbergfalk
Copy link
Collaborator Author

This is one the hardest parts as maintainer.... If it were just me I'd drop JSON and standardize on environment vars/.env file in an instant. Less to maintain and document.

However as an end user it could be inconvenient... Maybe I'm using JSON and it is fine and if it is removed I need to change. But maybe it is beneficial in the long run if things are easier to read about in documentation?

I guess ideally I'd like someone to chime in and say "I use JSON but I wouldn't mind being
restricted to environment variables"... but that probably won't happen 🙃.

Anyone out there want to tell me its okay to drop JSON file support 😂 (Or make a case to leave it in?)

@rickbergfalk rickbergfalk changed the title Deprecate INI config file? Deprecate INI config file? (and JSON too? Maybe add .env instead?) Jun 17, 2020
@rickbergfalk rickbergfalk added this to the v5.x milestone Jul 4, 2020
@rickbergfalk rickbergfalk changed the title Deprecate INI config file? (and JSON too? Maybe add .env instead?) Deprecate INI/JSON config and add .env file support. Jul 5, 2020
@rickbergfalk
Copy link
Collaborator Author

.env is added in 5.1.0 and JSON/INI deprecated

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

No branches or pull requests

2 participants