diff -ru src/Extension/CoreExtension.php src/Extension/CoreExtension.php --- src/Extension/CoreExtension.php 2025-04-24 11:22:29.736583629 +0000 +++ src/Extension/CoreExtension.php 2025-04-24 11:22:30.685585595 +0000 @@ -2089,7 +2089,7 @@ } if ($env->hasExtension(SandboxExtension::class) && $env->getExtension(SandboxExtension::class)->isSandboxed()) { - throw new RuntimeError(\sprintf('The callable passed to the "%s" %s must be a Closure in sandbox mode.', $thing, $type)); + throw new RuntimeError(\sprintf('The callable passed to the "%s" "%s" must be a Closure in sandbox mode.', $thing, $type)); } trigger_deprecation('twig/twig', '3.15', 'Passing a callable that is not a PHP \Closure as an argument to the "%s" %s is deprecated.', $thing, $type);