- Issue created by @foxtrotcharlie
- Assigned to foxtrotcharlie
- Merge request !9509Use twig_callable attribute instad of getNode('filter') → (Closed) created by foxtrotcharlie
- 🇺🇸United States bobburns
patch 3474692 throws
Error: Call to a member function getCallable() on string in Twig\Node\Expression\CallExpression->getTwigCallable() (line 350 of /var/www/public_html/vendor/twig/twig/src/Node/Expression/CallExpression.php).
Backtrace
#0 /var/www/public_html/vendor/twig/twig/src/Node/Expression/CallExpression.php(31): Twig\Node\Expression\CallExpression->getTwigCallable()
#1 /var/www/public_html/vendor/twig/twig/src/Node/Expression/FilterExpression.php(71): Twig\Node\Expression\CallExpression->compileCallable(Object(Twig\Compiler))
#2 /var/www/public_html/vendor/twig/twig/src/Compiler.php(99): Twig\Node\Expression\FilterExpression->compile(Object(Twig\Compiler))
#3 /var/www/public_html/vendor/twig/twig/src/Node/PrintNode.php(40): Twig\Compiler->subcompile(Object(Twig\Node\Expression\FilterExpression))
#4 /var/www/public_html/vendor/twig/twig/src/Compiler.php(99): Twig\Node\PrintNode->compile(Object(Twig\Compiler))
#5 /var/www/public_html/vendor/twig/twig/src/Node/Node.php(108): Twig\Compiler->subcompile(Object(Twig\Node\PrintNode))
#6 /var/www/public_html/vendor/twig/twig/src/Compiler.php(99): Twig\Node\Node->compile(Object(Twig\Compiler)). . . more
- First commit to issue fork.
- First commit to issue fork.
- 🇳🇱Netherlands bbrala Netherlands
Reviewed this mr.
- Checked the MR and the fixes are great.
- Checked core for any other places where we try to get filter, but haven't found any but there.
- Tests are all green.
- Undoing the comment change from the earliest commit is also great to remove the out-of-scope change.
All is looking good! Awesome <3
- 🇬🇧United Kingdom catch
OK this looks good - nice to get rid of all the deprecaton ignore lines.
Committed/pushed to 11.x and cherry-picked back through to 10.3.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇮🇳India hiramanpatil
I am using Drupal 10.3.5 with PHP 8.3.5 and seeing the following warnings in the build logs when running unit tests using ExistingSite base class. Is there any direct patch available to resolve these?
365x: Since twig/twig 3.12: Getting node "filter" on a "Twig\Node\Expression\FilterExpression" class is deprecated.
365x in RisesmartRoutingTest::testAllRoutesAccess from Drupal\Tests\custom_module\ExistingSite163x: Since twig/twig 3.11: Changing the value of a "filter" node in a NodeVisitor class is not supported anymore.
163x in RisesmartRoutingTest::testAllRoutesAccess from Drupal\Tests\custom_module\ExistingSite15x: Since twig/twig 3.12: Not passing an instance of "TwigFunction" when creating a "render_var" function of type "Twig\Node\Expression\FunctionExpression" is deprecated.
15x in RisesmartRoutingTest::testAllRoutesAccess from Drupal\Tests\custom_module\ExistingSite4x: Since twig/twig 3.12: Getting node "filter" on a "Twig\Node\Expression\Filter\DefaultFilter" class is deprecated.
4x in RisesmartRoutingTest::testAllRoutesAccess from Drupal\Tests\custom_module\ExistingSiteThanks,
- 🇺🇸United States maddentim
@hiramanpatil I believe this is fixed in 10.3.6.