-
-
Notifications
You must be signed in to change notification settings - Fork 438
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
DRAFT: Fix/environment loader #4617
base: main
Are you sure you want to change the base?
Conversation
@sreichel Please see this PR. |
Quick test. 404 one every page. |
Maybe it come from invalid setting .... ?
|
For reference my old config:
With yours I am getting infinite loop. |
The error was caused by the via 1f6b7ed |
Quality Gate passedIssues Measures |
Thanks for working on it. Cant make a PR to your repo right now ... how about to filter env vars in getEnv()? public function getEnv(): array
{
if (is_null($this->envStore)) {
$env = getenv();
$env = array_filter($env, function ($key) {
return str_starts_with($key, self::ENV_STARTS_WITH);
}, ARRAY_FILTER_USE_KEY);
$this->envStore = $env;
}
return $this->envStore;
} Maybe add an additional check vor env |
Yes, on default scope, but not on one website/storeview level. (Scope label should ben changed to "ENV") |
Note ... Tests should be updated. |
Description (*)
This PR attempts to fix the incomplete attempt for config values to be overwritten from ENV variables.
Related Pull Requests
Fixed Issues (if relevant)
Relates to issue #4257 (comment)
Manual testing scenarios (*)
Mage::getStoreConfig
.Questions or comments
Please give feedback to this WIP solution.
Maybe in the future we can add a reasoning of "why" the field in the backend is disabled for edits. Such as give a "warning" sign and show that this field is overwritten by a environment variable.
I feel that this is out of scope for now, for I think that the feature should first work the best it can.
Contribution checklist (*)