hearsayit / HearsayRequireJSBundle

RequireJS integration for Symfony2.
130 stars 55 forks source link

Remove deprecated calls Twig_Function_Method #79

Open tobo-pl opened 9 years ago

tobo-pl commented 9 years ago

Please remove deprecated twig calls Twig_Function_Method in /Hearsay/RequireJSBundle/Twig/Extension/RequireJSExtension

public function getFunctions()
    {
        return array(
            'require_js_initialize' => new \Twig_Function_Method($this, 'renderInitialize', array('is_safe' => array('html'))),
        );
    }

should be replaced by:

public function getFunctions()
    {
        return array(
             new \Twig_SimpleFunction('require_js_initialize', array($this, 'renderInitialize'), array('is_safe' => array('html'))),
        );