bug #3326 Throw exception in case non-Traversable data is passed to "filter" (Lustmored)
bug #3326 Throw exception in case non-Traversable data is passed to "filter" (Lustmored)

This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.

Discussion
----------

Throw exception in case non-Traversable data is passed to "filter"

In PHP 7.4 passing for example null to |filter generates TypeError. I was unsure how to proceed from there as filter could silently fall back to empty result, but instead I went with throwing RuntimeExceptions to be consistent with |batch and |column.

I got confused in structure of tests here, so if that should have some kind of test please push me in the right direction and I'll gladly add it.

Commits
-------

5311963e Throw exception in case non-Traversable data is passed to "filter" filter

twigphp/Twig,twigphp/Twig,twigphp/Twig