This PR was merged into the 2.x branch.
Discussion
----------
Deprecate CoreExtension::setEscaper() and CoreExtension::getEscaper() in favor of the same methods on EscaperExtension
This is some preliminary work to ease #3025. Everything related to escaping is now part of the `EscaperExtension` instead of `CoreExtension`. This PR is submitted on 2.x because both extensions are always available in 2.x (which is not the case on 1.x).
Commits
-------
59d1d5d4 deprecated CoreExtension::setEscaper() and CoreExtension::getEscaper() in favor of the same methods on EscaperExtension
This PR was squashed before being merged into the 2.x branch (closes#3019).
Discussion
----------
Local macros auto-import
closes#1758, closes#861
This implements auto-import for macros defined in a template. To avoid BC breaks, I've decided to do the auto-import as the equivalent of `{% import _self as _self %}`, so local macros are loaded under the `_self` pseudo-variable:
```twig
{{ _self.hello("Fabien") }}
{% macro hello(name) -%}
Hello {{ name }}
{% endmacro %}
```
~~Note that this is done via a new extension that you need to explicitly enable for now. We can remove the need for the extension, just not sure if we want it. WDYT?~~
Commits
-------
3fcbc442 Local macros auto-import
This PR was merged into the 2.x branch.
Discussion
----------
Add a better error message for unknown macros
Commits
-------
1153534a added a better error message for unknown macros
This PR was merged into the 1.x branch.
Discussion
----------
Fix the "filter" filter when the argument is \Traversable but does not implement \Iterator
close#3015, closes#3016
Commits
-------
c2f685e1 fixed the "filter" filter when the argument is \Traversable but does not implement \Iterator
This PR was merged into the 2.x branch.
Discussion
----------
Add support for macros on "is defined" tests
closes#1313
Commits
-------
9fe3213d added support for macros on "is defined" tests
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes#3006).
Discussion
----------
update docs for for loop with conditional to reference filter filters
I don't know if there needs to be the same emphasis for this case as there's no special syntax for this any more? This PR assumes the same emphasis.
Commits
-------
b905e023 update docs for for loop with conditional to reference filter filters
This PR was merged into the 2.x branch.
Discussion
----------
Macros imported "globally" in a template are now available in macros without re-importing them
closes#1790, closes#1052, closes#2414, closes#2442
Commits
-------
e1381640 macros imported "globally" in a template are now available in macros without re-importing them
This PR was merged into the 1.x branch.
Discussion
----------
Fix a PHP fatal error when calling a macro imported in the template in a nested block
Commits
-------
11353ce3 fixed a PHP fatal error when calling a macro imported in the template in a nested block