diff -ru src/Extension/CoreExtension.php src/Extension/CoreExtension.php --- src/Extension/CoreExtension.php 2024-02-10 09:36:15.915878535 +0000 +++ src/Extension/CoreExtension.php 2024-02-10 09:36:22.155090273 +0000 @@ -330,7 +330,7 @@ } if (!\count($values)) { - throw new RuntimeError('The "cycle" function does not work on empty arrays'); + throw new RuntimeError('The "cycle" function does not work on empty arrays.'); } return $values[$position % \count($values)]; @@ -1067,7 +1067,7 @@ public static function matches(string $regexp, ?string $str) { set_error_handler(function ($t, $m) use ($regexp) { - throw new RuntimeError(sprintf('Regexp "%s" passed to "matches" is not valid', $regexp).substr($m, 12)); + throw new RuntimeError(sprintf('Regexp "%s" passed to "matches" is not valid.', $regexp).substr($m, 12)); }); try { return preg_match($regexp, $str ?? ''); @@ -1855,7 +1855,7 @@ public static function checkArrowInSandbox(Environment $env, $arrow, $thing, $type) { if (!$arrow instanceof \Closure && $env->hasExtension('\Twig\Extension\SandboxExtension') && $env->getExtension('\Twig\Extension\SandboxExtension')->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)); } } }