Reuse the already resolved callable when compiling call arguments

This commit is contained in:
Fabien Potencier
2026-09-22 21:49:25 +01:00
parent 154ae335bb
commit 16be8af8f5
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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
+1 -1
View File
@@ -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(', ');