This PR was merged into the 1.x branch.
Discussion
----------
fix C89 compat
@tucksaun @fabpot The extension did not compile anymore with old MSVC compilers. This PR contains the fix.
Commits
-------
c6be57f fix C89 compat
This PR was merged into the 1.x branch.
Discussion
----------
Add a simple Twig_RuntimeLoaderInterface implementation
Next to https://github.com/symfony/symfony/pull/21023
This is related to the BC break reported in symfony/symfony#21008 which has been introduced in symfony/symfony#20093 when decoupling extensions from definitions.
What I propose here is to ease the upgrade to symfony 3.2+ by adding a simple `Twig_RuntimeLoaderInterface` implementation here, useful only when using the twig-bridge outside of the symfony fullstack framework (with the Form component for instance).
Upgrading would be as simple as:
```diff
$twig = new Twig_Environment(...);
$rendererEngine = new TwigRendererEngine(array('form_div_layout.html.twig'), $twig);
- $twig->addExtension(new FormExtension(new TwigRenderer($rendererEngine, $csrfTokenManager)));
+ $twig->addExtension(new FormExtension());
+ $twig->addRuntimeLoader(new Twig_RuntimeLoader(array(TwigRenderer::class => new TwigRenderer($rendererEngine, $csrfTokenManager)));
```
Instead of having to write this runtime loader yourself.
Please see symfony/symfony#21008 for details and a concrete example of how this could help.
Commits
-------
91c8d59 Add a Twig_FactoryRuntimeLoader
This PR was merged into the 1.x branch.
Discussion
----------
add a comma to clarify the meaning
Without the comma you could understand that the "if" not only applied
to `-1`, but to `1` as well if you read too quickly.
Commits
-------
7cd3c9d add a comma to clarify the meaning
This PR was squashed before being merged into the 1.x branch (closes#2308).
Discussion
----------
added PHP CS Fixer config
Commits
-------
aa9604a added PHP CS Fixer config
aa71a65 fixed CS
This PR was merged into the 1.x branch.
Discussion
----------
deprecate function/test/filter/tag overriding
closes#2293
Commits
-------
7ffb188 deprecated function/test/filter/tag overriding
This PR was merged into the 1.x branch.
Discussion
----------
deprecate the "disable_c_ext" attribute on Twig_Node_Expression_GetAttr
Commits
-------
c215966 Sync PHP ext with PHP code to trigger deprecations
014ab1f deprecated the "disable_c_ext" attribute on Twig_Node_Expression_GetAttr
This PR was merged into the 1.x branch.
Discussion
----------
removed ltrim because $class variable already ltrim'ed
removed ltrim because $class variable already ltrim'ed
Commits
-------
3badb14 removed ltrim because $class variable already ltrim'ed
This PR was merged into the 1.x branch.
Discussion
----------
Remove $env argument type from ExpressionParser constructor
Either the argument type should be removed, or the whole "else" block and the deprecation warning is useless.
Commits
-------
3de96ef Remove argument type from ExpressionParser constructor
This PR was merged into the 1.x branch.
Discussion
----------
Fix sandbox being left enabled if an exception is thrown while rendering
What's happening for me:
- An exception is thrown while rendering inside the sandbox
- Render exception response
- WebProfiler toolbar tries to include a file
- Sandbox is still enabled, so a SecurityException is thrown (which hides the real error)
Commits
-------
171a1d4 Fix sandbox being left enabled if an exception is thrown while rendering with include function
This PR was merged into the 1.x branch.
Discussion
----------
Cleanup
Two things here:
guessTemplateInfo is private in 2.x
this PR will fix tests on 2.x
setTemplateName is deprecated, and the removed code paths are never run
Commits
-------
782102d Cleanup
This PR was merged into the 1.x branch.
Discussion
----------
Better testing of operators returned by Extension
Add better testing and docs description about operators when using an extension.
Commits
-------
282df53 Better type description on PHPDoc, better testing of returned value.
This PR was merged into the 1.x branch.
Discussion
----------
marked some classes as being final
Not sure about this one. I'd like some reviews before merging (we might make some other ones final and I might have marked some as final which should not). ping @stof @nicolas-grekas
Commits
-------
e89c712 marked some classes as being final
This PR was merged into the 1.x branch.
Discussion
----------
added support for {{ _self }} to provide an upgrade path from 1.x to 2.0
fixes#2284
Commits
-------
8ab764b added support for {{ _self }} to provide an upgrade path from 1.x to 2.0