A recent change to Twig has resulted in a deprecation warning when using datatables-bundle:
Using the "Twig_Extension" class is deprecated since Twig version 2.7, use "Twig\Extension\AbstractExtension" instead.
The fix itself looks relatively simple - just extend AbstractExtension instead of Twig_Extension (in HEAD Twig_Extension is a straight subclass of AbstractExtension, no extra code at all). But there would potentially be a knock-on effect to datatables-bundle dependencies.
A bit of rummaging on Packagist etc gives me the following:
The deprecation was introduced in twig/twig on 2019-03-05; v2.7.0 was released 2019-03-12.
symfony/symfony starts requiring twig/twig ^2.9 instead of ^2.4.4 in v3.4.27, released 2019-04-17.
omines/datatables-bundle doesn't directly require twig/twig, but does support no lower than Symfony ^3.4
I'm not sure how old a version of twig/twig would be compatible with just extending AbstractExtension. It seems to have existed since 2017-05-24, but there's some namespacing stuff going on that I don't quite get.
A recent change to Twig has resulted in a deprecation warning when using
datatables-bundle
:The fix itself looks relatively simple - just extend
AbstractExtension
instead ofTwig_Extension
(in HEADTwig_Extension
is a straight subclass ofAbstractExtension
, no extra code at all). But there would potentially be a knock-on effect to datatables-bundle dependencies.A bit of rummaging on Packagist etc gives me the following:
The deprecation was introduced in
twig/twig
on 2019-03-05; v2.7.0 was released 2019-03-12.symfony/symfony
starts requiringtwig/twig ^2.9
instead of^2.4.4
in v3.4.27, released 2019-04-17.omines/datatables-bundle
doesn't directly requiretwig/twig
, but does support no lower than Symfony^3.4
I'm not sure how old a version of
twig/twig
would be compatible with just extendingAbstractExtension
. It seems to have existed since 2017-05-24, but there's some namespacing stuff going on that I don't quite get.