Open steevanb opened 2 months ago
I have not (yet) tested it with a function to be honest, but first thing that comes to mind: is the return value of your "getAttackFqcn" function an escaped string?
Also, please specify which version of PHP and Twig (and Symfony if applicable)
Hi,
getAttackFqcn() return Attack::class, I can espace it if needed.
PHP: 8.3, Symfony: 7.0, Twig: latest
Yes, please escape the \ from the namespace, a simple addslashes(Attack::class)
should be enough.
The problem is that Twig attributes can't have unescaped backslashes (afaik)
Hi,
Thanks for your awesome extension, i will never understand why it's not in Twig...
But i have this error:![2024-04-13_17h46_59](https://github.com/lelyfoto/twig-instanceof/assets/5063383/92606146-6408-48d7-9470-9d9f776f73da)
With this code in my twig template:
Here is the dump before the exception is throwned: