I'm trying to override a vendor Twig extension,but I'm getting this error: Cannot redeclare class APY\DataGridBundle\Twig\DataGridExtension .
I have just copied the php from vendor to my bundle extension folder, rename the namespace to Acme\DemoBundle\Extension;
and then add this to my config.yml
parameters:
grid.twig_extension.class: Acme\DemoBundle\Extension\DataGridTwigExtension
following the directions from services override http://symfony.com/doc/current/cookbook/bundles/override.html
Any ideas to solve this? Thanks!