Registrar: Merge Config arrays |
The current behavior looks incorrect.
If I want to add Filters, supportedLocales, for example, then my settings will overwrite the default data. But it would be logical to combine them. PHP Code: // before, globals filters Should I change it to array_merge_recursive() Otherwise, you will have to duplicate all the values manually. This is bad for a modular system where each component changes arrays.
Do you have an opinion on this? I thought that sometimes a merge is not required and a replacement is needed. It may be worth adding a flag to overwrite
Yes i used array_merge_recursive. I discovered the issue to so i extend the base config to child class today fix this but i think the usage of array_merge_recursive is a better option @kenjis help on this to update the core code
`\Codeigniter\Config\BaseConfig` PHP Code: /**
This is not a complete solution. For example, for an array of App $supportedLocales, Pager $templates, adding is a good way. There are no Filters.
It may be worth passing the current values of $this (for reading) to the Registrar |
Welcome Guest, Not a member yet? Register Sign In |