Remove deprecation arg

This commit is contained in:
Fabien Potencier
2024-08-09 18:02:41 +02:00
parent 3301b99276
commit 5550140931
+2 -1
View File
@@ -60,8 +60,9 @@ final class EscaperExtension extends AbstractExtension
/**
* @deprecated since Twig 3.10
*/
public function setEnvironment(Environment $environment, bool $triggerDeprecation = true): void
public function setEnvironment(Environment $environment): void
{
$triggerDeprecation = \func_num_args() > 1 ? func_get_arg(1) : true;
if ($triggerDeprecation) {
trigger_deprecation('twig/twig', '3.10', 'The "%s()" method is deprecated and not needed if you are using methods from "Twig\Runtime\EscaperRuntime".', __METHOD__);
}