The check in AnalyzedTemplatesTainter for Twig variables just checks for ([a-zA-Z]+) while Twig variables could contain other characters (like _). Having a variable named my_result leads to:
Uncaught Exception: Argument 2 passed to Psalm\SymfonyPsalmPlugin\Twig\TemplateFileAnalyzer::getTaintNodeForTwigNamedVariable() must be of the type string, null given, called in /Users/myuser/projects/myapp/vendor/psalm/plugin-symfony/src/Twig/AnalyzedTemplatesTainter.php on line 45
The check in AnalyzedTemplatesTainter for Twig variables just checks for
([a-zA-Z]+)
while Twig variables could contain other characters (like_
). Having a variable namedmy_result
leads to: