mtymek/expressive-config-manager

Remove stdlib dependency

Closed this issue · 2 comments

Hi,

This Stdlib dependency in most projects is added only for the merge method of ArrayUtils. I'm encountering issue with dependency versions (mainly for hydrator, where Stdlib requires 1.x, but other libraries require 2.x).

As this project only use it for merge, can't we simply copy-paste the merge method to this project? I know this not favor re-usability, but I feel it is better than including the whole stdlib (which really contains 99% of stuff not needed), and introduces that kind of issues with dependencies.

I'm not in favor of duplicating this code - there is some handy logic behind it like removing config keys. Having said that, I also share your dislike of pulling all this unnecessary classes. So, I'm in doubt.

Ideally Zend\Stdlib should be split into more smaller components (ArrayUtils, StringUtils, ...), but I'm not sure if ZF team is willing to do it. I will keep it as it is for now, and I will bring this subject back when this component is brought into ZF organization - it will be the right time to ask community about some conventions.

I followed the same patters as ServiceManager in zendframework/zend-servicemanager#68. This issue is closed with #10.