Skip to content

Commit

Permalink
Replace setArguments with withDynamicArguments #36
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Oct 23, 2024
1 parent 9a59f4f commit b76974b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/TwigAssetsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@
*/
final class TwigAssetsExtension extends AbstractExtension
{
/**
* @var TwigAssetsEngine
*/
private $engine;
private TwigAssetsEngine $engine;

/**
* TwigAssetsExtension constructor.
* The constructor.
*
* @param Environment $env The environment
* @param array $options The options
Expand All @@ -39,7 +36,7 @@ public function getFunctions()
'is_safe' => ['html'],
]);

$function->setArguments([]);
$function = $function->withDynamicArguments($function->getName(), $function->getDynamicName(), []);

return [$function];
}
Expand Down

0 comments on commit b76974b

Please sign in to comment.