Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Service issues with Symfony 4.1 #25

Open
soullivaneuh opened this issue Jul 3, 2018 · 1 comment
Open

Service issues with Symfony 4.1 #25

soullivaneuh opened this issue Jul 3, 2018 · 1 comment

Comments

@soullivaneuh
Copy link
Contributor

The console update command need a service registration and the borwscap service need to be public or autowired (#24)

Current workaround on kernel compilation:

final class Kernel extends BaseKernel implements CompilerPassInterface
{
    use MicroKernelTrait;

    public function process(ContainerBuilder $container): void
    {
        $container->setDefinition(
            \Browscap\BrowscapBundle\Command\UpdateCommand::class,
            (new Definition(\Browscap\BrowscapBundle\Command\UpdateCommand::class))
                ->addTag('console.command')
        );
        $container->getDefinition('browscap')->setPublic(true);
    }
@mimmi20
Copy link
Member

mimmi20 commented Jul 3, 2018

@soullivaneuh Please provide a PR for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants