add test for getChildrenByCaptureTo
add method getChildrenByCaptureTo
[#5191] Remove trailing comma

- invalidates JSON, breaking installation of component via composer
Merge branch 'hotfix/version-composer'

Fix for issue introduced with #5191
Merge branch 'hotfix/version-composer' into develop

Fix for issue introduced with #5191
Fixed NULL value throwing InvalidArgumentException in Zend\Log\Logger::__construct()
Merge branch 'develop' into fix/form-label-options
Bug fix:
When a Traversable is encountered it is converted to an array.
By default this is done recursively, so that the Traversable becomes an array representation.
The result of that is saved in $this->object.
In the Colletion::extract method when iterating over $this->object there are two branches:
1. If there is a hydrator, its extract method is called which expects $value as an object.
2. If $value is an instance of the targetElement, eventualy setObject($value) is called on a fieldset, which also expects an object. Also the targetElement object is set to $value.

In both cases an object is expected, but because of recursive iteratorToArray call it will never be an object.

The fix is to not do it recursively, this way it still gives a key => value array representation of the traversable,
but still gives model objects that can be used by a hydrator or set as targetElement object.

The above problem occurs when an extended Traversable that implements the toArray method is being used in the ArrayUtils::iteratorToArray method.
Because it is recursive per default, it calls the toArray method on the traversable and in case this is implemented in a way that also calls toArray on all child elements, the whole traversable is converted to a scalar-only-array.
So now that there are no object, the Zend\Form\Element\Collection::extract method can not use the hydrator extract method on an array. Also the targetElement hydrator can not do it.
So the extract method fails even though there is probably an array containing a lot of nice values.

The solution chosen by me is to not recursively transform. That works as shown in the two added testcases.
Another fix would be to rewrite the way the extract method works. Or to better dictate how the traversable should be constrained to be transformed in a more controlled way.
Fixes problems highlighted by @DASPRiD and @Maks3w
- do simple in_array comparison for transfer encoding
- remove to many spaces befor equal sign
- use camelCase var names
added zendframework/zend-session as suggest dependency at Zend\ProgressBar
added recursive implementation
added recursive flag
fix typo
added docblock
added getChildrenByCaptureTo to interface
Changed conditional to PSR-2 format. Refactored to remove duplicate array check.
fix trailing spaces
incorporated test for disable_html_escape on multiCheckbox option labels
collections should be rendered in fieldsets if shouldWrap is set to true even if no label (legend) is given.
added zendframework/zend-cache as suggest dependency at Zend\Paginator