Description

Some twig comparisons stringify things like objects, some others don't.

For example, this wouldn't return true, ever:

{% if attributes.name in ['tags_any', 'tags_all', 'tags_none'] %}
booyag
{% endif %}

This is because "attributes.name" is a markup object not a string. You have to render it if you want the actual string, or get it some other way:

{% if attributes.name|render in ['tags_any', 'tags_all', 'tags_none'] %}
booyag
{% endif %}

Beats me why an exact match comparison is used within the "in" operator.

This also applies to other operators.