Skip to content

Twig 2.13.1 introduces a third parameter for twig_array_filter() #2301

@gchtr

Description

@gchtr

This issue was raised in https://wordpress.org/support/topic/args-passed-to-twig_array_filter-must-be-an-instance-of-twigenvironment/.

In this commit, they changed the parameters from

function twig_array_filter($array, $arrow) {}

to

function twig_array_filter(Environment $env, $array, $arrow) {}

Yes, they prepended a parameter. This now conflicts with the patch we introduced in Timber 1.14.0, in #2124 to be exact. The tricky thing would be to get the Twig environment in there. Or maybe we need to take a completely different approach.

@palmiak Any idea how we could solve this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions