Replace the deprecated twig_test_even function in the custom test example

This commit is contained in:
Fabien Potencier
2026-09-25 23:53:00 +02:00
parent db3aeb7379
commit e883536e64
+1 -1
View File
@@ -846,7 +846,7 @@ The ``getTests()`` method lets you add new test functions::
public function getTests()
{
return [
new \Twig\TwigTest('even', 'twig_test_even'),
new \Twig\TwigTest('even', fn (int $value): bool => 0 === $value % 2),
];
}