Twig icon indicating copy to clipboard operation
Twig copied to clipboard

Twig, the flexible, fast, and secure template language for PHP

Results 200 Twig issues
Sort by recently updated
recently updated
newest added

In `3.9.x` the escaper callback was called with 3 arguments: * The environment `$env` * The string `$string` * The character set `$charset` https://github.com/twigphp/Twig/blob/a842d75fed59cdbcbd3a3ad7fb9eb768fc350d58/src/Extension/EscaperExtension.php#L408 However, in `3.10.1` (and probably `3.10.0`)...

hey 👋🏻 Regarding [this PR](https://github.com/VincentLanglet/Twig-CS-Fixer/pull/218) and the comments/twigs/docs linked (listed down below) I would like to know what is the best way to deprecate the tag in this root repo....

Alternative PHP servers like RoadRunner don't unload PHP processes and process multiple requests per process allowing to get a significant performance increase. Unfortunately, Twig is not fully compatible with such...

It is noted that when calling functions/macros specifically, one can use lambdas [as discussed here](https://symfony.com/blog/twig-adds-filter-map-and-reduce-features). However, it is not possible to assign a lambda to a variable or a hash...

This change causes no difference to compiled templates or to macro argument semantics. Consider the following macro: ```twig {% macro marco(po, lo = null) %}{% endmacro %} ``` With this...

These nodes have no effect on compiled templates. Adding these to the TokenStream and AST enables extensions to add logic in node visitors, such as parsing PHPDoc-style `@var string name`...

Hey! This PR introduces CVA to Twig. All of this has already been merged into SymfonyUX (https://github.com/symfony/ux/pull/1416), but @kbond suggested that this repo can be a better place for this...

I'd love to use static code analysis and/or linting for our logic-heavy templates to prevent silly mistakes from breaking production. (Asking for a friend 😉) Compiling templates catches syntax errors,...

My Twig extension implements a global that is an adapter for my CMS. ```php public function getGlobals(): array { return [ 'cms' => $this->adapter, ]; } ``` I would like...