KnpLabs / rad-auto-registration

Auto register some common services
MIT License
8 stars 2 forks source link

Deprecation notice is thrown for twig extension even when twig autoregistration is not enabled #38

Open akovalyov opened 7 years ago

akovalyov commented 7 years ago

Given symfony 3.0 and the following config:

knp_rad_auto_registration:
    enable:
        form_type_extension: ~

The possibility to register the same extension twice ("$extension") is deprecated since version 1.23 and will be removed in Twig 2.0. Use proper PHP inheritance instead. for each extension available in the codebase. The most irritating thing is that twig extensions autoregistration is not enabled. How can we fix it?

akovalyov commented 7 years ago

Reason: https://github.com/KnpLabs/rad-auto-registration/blame/master/src/Knp/Rad/AutoRegistration/Bundle/AutoRegistrationBundle.php#L46. That's why twig exts are being registered twice. But why was it added? @AntoineLelaisant @PedroTroller maybe you have an idea?