diff --git a/composer.json b/composer.json index c646819..9213b26 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ ], "require": { "php": "^8.1", - "twig/twig": "~3.0", + "twig/twig": "~3.9", "illuminate/support": "^9|^10|^11", "illuminate/view": "^9|^10|^11" }, diff --git a/src/Node/GetAttrNode.php b/src/Node/GetAttrNode.php index 5b33ad2..81d619e 100644 --- a/src/Node/GetAttrNode.php +++ b/src/Node/GetAttrNode.php @@ -145,23 +145,6 @@ public static function attribute( return $object->$item; } - // Note: Since twig:3.9 the 'twig_get_attribute' function was renamed to CoreExtension::getAttribute. - // Because this is an internal function of twig, the authors could break it in a minor version. - if (!function_exists('twig_get_attribute')) { - return CoreExtension::getAttribute($env, $source, $object, $item, $arguments, $type, $isDefinedTest, $ignoreStrictCheck); - } - - return \twig_get_attribute( - $env, - $source, - $object, - $item, - $arguments, - $type, - $isDefinedTest, - $ignoreStrictCheck, - $sandboxed, - $lineno - ); + return CoreExtension::getAttribute($env, $source, $object, $item, $arguments, $type, $isDefinedTest, $ignoreStrictCheck); } }