sf4 resolve errors and depreciations

This commit is contained in:
2020-07-30 13:53:15 +02:00
parent 7881efa5fe
commit ced9d17d03
92 changed files with 52 additions and 51 deletions

View File

@@ -22,6 +22,8 @@ namespace Chill\MainBundle\Templating\Widget;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Chill\MainBundle\Templating\Widget\WidgetInterface;
use Chill\MainBundle\Templating\Events\DelegatedBlockRenderingEvent;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
/**
* Add the function `chill_delegated_block`.
@@ -49,7 +51,7 @@ use Chill\MainBundle\Templating\Events\DelegatedBlockRenderingEvent;
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
*/
class WidgetRenderingTwig extends \Twig_Extension
class WidgetRenderingTwig extends AbstractExtension
{
/**
@@ -90,14 +92,14 @@ class WidgetRenderingTwig extends \Twig_Extension
public function getFunctions()
{
return array(
new \Twig_SimpleFunction('chill_delegated_block',
new TwigFunction('chill_delegated_block',
array($this, 'renderingWidget'),
array(
'is_safe' => array('html'),
'needs_environment' => true,
'deprecated' => true, 'alternative' => 'chill_widget'
)),
new \Twig_SimpleFunction('chill_widget',
new TwigFunction('chill_widget',
array($this, 'renderingWidget'),
array('is_safe' => array('html'), 'needs_environment' => true))
);