Twig icon indicating copy to clipboard operation
Twig copied to clipboard

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

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

Back in 2013 https://github.com/twigphp/Twig/issues/962 - the solution proposed was to " recommend you to fix your code to avoid any issues in the future" Well here we are in 2022......

In most programming languages (such as C++, Java, or PHP) the boolean unary NOT operator has a higher precedence than e.g. the multiplication, division, remainder, or relational operators. It usually...

I noticed a problem when using the {% cache "cache_name" tag('tag_name') %}. This creates an entry in Redis in a form of: `"...:tag_name\x00tags\x00"` while "Adapter/AbstractTagAwareAdapter.php" `invalidateTags()` seems to look for`"...:\x00tags\x00tag_name"`...

As @weaverryan and I have been working on Twig/Live components in `symfony/ux`, we've come across a few areas where named argument support would be valuable. This issue is intended to...

Add support for the optional chaining operator `?.` that is available in: - JavaScript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining - TypeScritp 3.7: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#optional-chaining - Latte 2.6: https://blog.nette.org/en/new-in-latte-2-6-optional-chaining-and-custom-functions#toc-optional-chaining - PHP 8: https://www.php.net/releases/8.0/en.php#nullsafe-operator ```twig {# Before...

Investigate before 4.x

Hi! I'm facing an issue related to #3451 Consider the following example: ```php class SomeExtension extends AbstractExtension { private array $filters = [ 'filter1', 'filter2', 'filter3', // and so on......

Investigate before 4.x

Fixes #3450 Currently Twig does not check if the callable passed to CallExpression is actually a callable. This pull request adds does checks. If it is a function it check...

Hello, I found a strange behavior with all Twig versions. ```twig {{ block('block1', 'theme.html.twig') }}` {# theme.html.twig #} {% extends 'base.html.twig' %} {%- block block2 -%} BLOCK2THEME/ {%- endblock -%}...

Investigate before 4.x

I'm trying to insert a non-breaking space (NBSP) into a string in a Twig template, but all the ways I've thought to try haven't worked. And upon further research it...

'm just forwarding what @ondrejmirtes told me at https://github.com/phpstan/phpstan/issues/5640#issuecomment-921238545: Calling `twig_date_format_filter()` in `App\Twig\AppExtension` *sometimes* leads to phpstan reporting > Function twig_date_format_filter not found ... and sometimes it doesn't ;-) @ondrejmirtes...