From 16be8af8f5d1be6405ed88d2d10e52f41090f1f6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 22 Sep 2026 21:49:25 +0100 Subject: [PATCH] Reuse the already resolved callable when compiling call arguments --- CHANGELOG | 1 + src/Node/Expression/CallExpression.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index fdf14d885..66ed574dc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ * Fix the escaping safe analysis retaining every compiled template node for the lifetime of the environment * Speed up loading a template that the environment has already loaded * Speed up rendering by compiling a cheaper generator guard into templates + * Speed up compiling filter, function, and test calls * Fix `IntlExtension` letting the pattern derived from a date formatter prototype override an explicit locale * Fix `IntlExtension` not honoring the locale of a date formatter prototype configured with no date and time styles * Speed up macro calls diff --git a/src/Node/Expression/CallExpression.php b/src/Node/Expression/CallExpression.php index 94036c1d3..2a55ced49 100644 --- a/src/Node/Expression/CallExpression.php +++ b/src/Node/Expression/CallExpression.php @@ -125,7 +125,7 @@ abstract class CallExpression extends AbstractExpression } if ($this->hasNode('arguments')) { - $arguments = (new CallableArgumentsExtractor($this, $this->getTwigCallable()))->extractArguments($this->getNode('arguments')); + $arguments = (new CallableArgumentsExtractor($this, $this->getAttribute('twig_callable')))->extractArguments($this->getNode('arguments')); foreach ($arguments as $node) { if (!$first) { $compiler->raw(', ');