Closed stevenmaguire closed 9 years ago
bump? @kmfk you seem to have done some work on this one and are in the keenlabs org.
@stevenmaguire - sorry for any delays! Thanks for catching this and providing a fix, looks pretty good to me. Will pull it in and bump a new tag.
Awesome! Thanks, @kmfk
I uncovered a use case that caused the Client to throw errors during configuration load. If the
version
key is set, and is an empty string, in thefactory
config param, the Client will fail to load.I built a test to verify this behavior and it was in fact the case.
The issue, as far as I can tell, is that the
Collection::fromConfig
method from the Guzzle 3.7 library does not check if the value is empty when merging the arrays, and as such the default version is never applied.Instead of digging a path of resolution through Guzzle or even upgrading Guzzle within this package (I saw the other issue), I added a method that will perform an adequate check for emptiness of a common default key and assert the rule when encountered.