-
Notifications
You must be signed in to change notification settings - Fork 89
Remove Zend\Stdlib dependency #68
Remove Zend\Stdlib dependency #68
Conversation
@snapshotpl to also be removed from |
@Ocramius that funny because Stdlib doesn't exists in composer.json on master :) |
It's very strange for me why current tests on master pass. When I pull master branch, run
How it's possible that travis said it's ok? Is it cache? |
if (! isset($this->allowedKeys[$key])) { | ||
unset($config[$key]); | ||
foreach (array_keys($this->config) as $requiredKey) { | ||
if (isset($config[$requiredKey])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should likely be a combination of isset && is_array
, as every single item is expected to be an array. I'll make that change on merge.
Oof, on review, I realized that this is a rather large BC break, and cannot be merged. Why? Because it changes the behavior. In the current stable version, if values are present in the The appropriate way to get rid of zend-stdlib is as @Ocramius suggested elsewhere: copy the functionality of |
Sounds bad. Implementation of |
@weierophinney BTW I think is bug - tests on master don't pass. |
Only arrayutils::merge needs polyfilling, btw.
|
@weierophinney @Ocramius what about extracting ArrayUtils as a separate micro-library, same as it was done with hydrators? This way we will avoid code duplication. Yes, one external dependency would be still there, but we won't load lots of unnecessary classes. |
I think StdLib is enough small and don't need to be splitted. |
Agreed, stdlib is small enough
|
It is small if you take number of classes, but it has many responsibilities:
|
Wondering if we can just c&p the merging code (as private api)
|
Ok, but what about this feature? https://github.com/zendframework/zend-stdlib/blob/master/src/ArrayUtils.php#L272 Without this it's still break |
Can't it be simplified based on the context? For instance for a lib contains only a specific use case just Optimize the arrayUtils by removing useless stuff? Envoyé de mon iPhone
|
Ok, I copy ArrayUtils::merge to Config. I worried about |
I was concerned about the
We can make a suggestion in the Will merge shortly! |
Note that the breakage still needs documenting, but it is indeed part of Marco Pivetta On 19 January 2016 at 22:07, weierophinney notifications@github.com wrote:
|
@Ocramius Documenting it in the CHANGELOG. I've also documented the features in the class-level docblock of the |
Remove Zend\Stdlib dependency
...and simplify config implementation