Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit cc74dfc

Browse files
committed
merged branch fabpot/twig-deprecated-features (PR #580)
This PR was merged into the 2.2 branch. Discussion ---------- Twig deprecated features see symfony/symfony#8675 Commits ------- 35a5826 updated demo code to use the non-deprecated features of Twig
2 parents 7e7a613 + 35a5826 commit cc74dfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Acme/DemoBundle/Twig/Extension/DemoExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function setController($controller)
2525
public function getFunctions()
2626
{
2727
return array(
28-
'code' => new \Twig_Function_Method($this, 'getCode', array('is_safe' => array('html'))),
28+
new \Twig_SimpleFunction('code', array($this, 'getCode'), array('is_safe' => array('html'))),
2929
);
3030
}
3131

0 commit comments

Comments
 (0)