This PR was merged into the 2.x branch.
Discussion
----------
Fixed Twig\Template check
Looks like this was missed when the `Twig\Template` class was added, and `Twig_Template` was deprecated + aliased.
Commits
-------
67bff7b7 Fixed Twig\Template check
This PR was merged into the 2.x branch.
Discussion
----------
Macro not available in embed tags
Macro imported globally in a template via `import` or `from` are not available inside `embed` tags.
This behavior is present since Twig v2.0.0. I think it needs to be documented. Feel free to suggest an other text.
Here is some example :
- If the macro is imported globally, it's not available inside the `embed` tag, we get an error : https://twigfiddle.com/jwtwm3
```twig
{% import 'macro.twig' as macro %}
{% embed 'embed.twig' %}
{% block content %}
{{ macro.sayhello('Jérôme') }}
{% endblock %}
{% endembed %}
```
- Whereas is the macro is imported inside the `embed` tag, it's available in its `block` tags : https://twigfiddle.com/jwtwm3/2
```twig
{% embed 'embed.twig' %}
{% import 'macro.twig' as macro %}
{% block content %}
{{ macro.sayhello('Jérôme') }}
{% endblock %}
{% endembed %}
```
Commits
-------
be291441 Update doc for macro with embed tags
This PR was merged into the 2.x branch.
Discussion
----------
Fix compatibility with PHPUnit 9
Commits
-------
9a83f7ed Fix compatibility with PHPUnit 10
This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.
Discussion
----------
fix typo in ApplyTokenParser PHP doc
Typo
Commits
-------
47b5028f fix typo in ApplyTokenParser PHP doc
This PR was submitted for the 3.x branch but it was squashed and merged into the 1.x branch instead.
Discussion
----------
Fixes#3351
Sandbox mode is not disabled if syntax error occurs inside {% sandbox %} tag
Fixes#3351
Commits
-------
04658c9fFixes#3351
This PR was merged into the 1.x branch.
Discussion
----------
Fix a regression when not using a space before an operator
Commits
-------
841906b1 Fix a regression when not using a space before an operator
This PR was merged into the 1.x branch.
Discussion
----------
Unify code style
I noticed that the code style in `ExpressionParser` changed from v1 to v3. So this PR now fixes it, that the file in v1 looks more clean.
@fabpot this is a small addendum to #3363
Commits
-------
38cb89c2 Unify code style
This PR was squashed before being merged into the 1.x branch.
Discussion
----------
Allow trailing commas in macros + functions + filters
I implemented support for trailing commas in
- function calls
- filter arguments
- macro parameters + arguments (so call + definition)
Lists + maps are already supported https://twigfiddle.com/6atiz3
Is something missing?
Commits
-------
ccc2dbb0 Allow trailing commas in macros + functions + filters
This PR was squashed before being merged into the 1.x branch.
Discussion
----------
Restrict callables to closures in filters
When using filter in sandboxed mode, this PR requires the use of closure.
Commits
-------
d8259519 Restrict callables to closures in filters
This PR was squashed before being merged into the 2.x branch.
Discussion
----------
Update html_to_markdown.rst
Integrating some findings of https://github.com/twigphp/Twig/issues/3357
Commits
-------
4b8e1891 Update html_to_markdown.rst