-
Notifications
You must be signed in to change notification settings - Fork 136
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
set($value, null) should set value to null, not delete it #10
Comments
I've given it some more thought, and I think adding a I've looked through the code some more and found if a value is set to |
Initially when I did this, I think I had the mindset that configs, once loaded, should be read-only. I can't remember my exact train of thoughts or the use cases I had in mind that lead to the code as it is before the latest changes. I agree with the point you raised with null values in JSON configs. |
Haha, I literally came to the same conclusion. That being said, the |
After thinking about it, now I'm actually more inclined to make the loaded configs read-only again. It makes sense that configuration changes should be done in config files. Also, it'll simplify the class even further. So the class now just focuses on resolving paths inside the config, and returning values. What do you think? |
Yep, sounds great to me, shall I close the issue then? As much as I would prefer a |
For cases where null is actually a value, shouldn't we just set it as that.
If a value must be removed, we can add another method. Only reason being, and I'm pretty sure a test case would show this, is that in JSON, null is a valid value.
The text was updated successfully, but these errors were encountered: