title: How to Inject Dependencies in Twig Extension in SF4
body: <p>I'm trying to add the Assets dependencies to a TwigExtension however I'm ending up with : </p>
  
  <blockquote>
    <p>Cannot autowire service "App\Twig\AppExtension": argument "$urlPackage" of method "__construct()" references class "Symfony\Component\Asset\UrlPackage" but no such service exists.</p>
  </blockquote>
  
  <p>So this is basically what I'm doing : </p>
  
  <pre><code>use Symfony\Component\Asset\UrlPackage;
  
  ...
  
  protected $urlPackage;
  public function __construct(UrlPackage $urlPackage)
  {
      $this-&gt;urlPackage = $urlPackage;
  }
  
  ....
  
  $url = $this-&gt;urlPackage-&gt;getUrl("build/assets/images/svg/notification.svg");
  </code></pre>
  
  <p>And of course I've checked weather or not the package is existing : </p>
  
  <pre><code>/var/www/fromton # bin/console debug:container | grep assets
    Symfony\Component\Asset\Packages                                                     alias for "assets.packages"                                                                     
    assets._default_package                                                              Symfony\Component\Asset\PathPackage                                                             
    assets._version__default                                                             Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy                             
    assets.context                                                                       Symfony\Component\Asset\Context\RequestStackContext                                             
    assets.empty_package                                                                 Symfony\Component\Asset\Package                                                                 
    assets.empty_version_strategy                                                        Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy                                    
    assets.json_manifest_version_strategy                                                Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy                             
    assets.packages                                                                      Symfony\Component\Asset\Packages                                                                
    assets.path_package                                                                  Symfony\Component\Asset\PathPackage                                                             
    assets.static_version_strategy                                                       Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy                                   
    assets.url_package                                                                   Symfony\Component\Asset\UrlPackage                                                              
    console.command.assets_install                                                       Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand                                     
    twig.extension.assets                                                                Symfony\Bridge\Twig\Extension\AssetExtension  
  </code></pre>
  
  <p>What the heck is wrong? Shall I do something in <code>services.yml</code> too?</p>