title: Symfony 4.1 twig extension
body: <p>In Symfony 4.1 I created an twig extension and I tried  to use it as an service</p>
  
  <pre><code>twig.extension.active.algos:
      class: App\Twig\AppExtension
      public: true
      tags:
          - { name: twig.extension, priority: 1024 }
  </code></pre>
  
  <p>Unfortunately I receive 'Unable to register extension "App\Twig\AppExtension" as it is already registered'
  After many searches I saw that there was a bag in the version of symfony 3.4 but they say the error would have solved. So it's my mistake or just another mistake from symfony team.</p>
  
  <p>My extension is:
      
  
  <pre><code>use Twig\Extension\AbstractExtension;
  use Twig\TwigFilter;
  
  class AppExtension extends \Twig_Extension {
  
  public function getFunctions() {
      return array(
          new \Twig_SimpleFunction('get_active_algos', array($this, getActiveAlgos')),
      );
  }
  
  public function getActiveAlgos()
  {
      return [1,2,3];
  }
  
  public function getName()
  {
      return 'get_active_algos';
  }
  }
  </code></pre>