browscap / BrowscapBundle

Symfony2 Bundle to access the browscap information
13 stars 12 forks source link

Provide auto-wiring for browscap service #24

Open soullivaneuh opened 6 years ago

soullivaneuh commented 6 years ago
  [Symfony\Component\DependencyInjection\Exception\RuntimeException]                                                                                                                                                                                    
  Cannot autowire service "AppBundle\Manager\BrowserManager": argument "$browscap" of method "__construct()" references class "phpbrowscap\Browscap" but no such service exists. You should maybe alias this class to the existing "browscap" service.  

Workaround:

$container->addAliases([
    \phpbrowscap\Browscap::class => 'browscap',
]);