-
Notifications
You must be signed in to change notification settings - Fork 11k
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
REQUEST: Changing array_merge() into array_merge_recursive() in \Illuminate\Support\ServiceProvider\mergeConfigFrom() #13108
Comments
http://jontai.me/blog/2011/12/array_merge_recursive-vs-array_replace_recursive/
|
We very intentionally don't do this recursively. |
Otherwise, how could you override a config entry with an empty array if it had other stuff there? |
Although this request is closed I'd like to show how it would be possible. For a bit of background Every module has a the
In short, it recursively removes null values from the config. It might not be backwards compatible nor Laravel worthy. But for whoever stumbles across this thread, it might be useful. On the downside... you can't have As for an example:
Results in:
|
Hi,
Is there any objection to change array_merge() to array_merge_recursive in mentioned method?
array_merge() will only merge on a shallow level, while the recursive one will do it properly (as far as I can see).
Any thoughts?
The text was updated successfully, but these errors were encountered: