Skip to content

Commit

Permalink
Use FQN service IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
spideyfusion committed Aug 24, 2019
1 parent f406f6c commit 9c96a22
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Trikoder\Bundle\OAuth2Bundle\Controller\AuthorizationController;
use Trikoder\Bundle\OAuth2Bundle\League\Repository\ScopeRepository;
use Trikoder\Bundle\OAuth2Bundle\League\Repository\UserRepository;
use Trikoder\Bundle\OAuth2Bundle\Service\BCEventDispatcher;

class EventDispatcherCompilerPass implements CompilerPassInterface
Expand All @@ -25,11 +28,11 @@ public function process(ContainerBuilder $container)
$container->setDefinition(BCEventDispatcher::class, $definition);

// Use our new service
$container->getDefinition('trikoder.oauth2.league.repository.scope_repository')
$container->getDefinition(ScopeRepository::class)
->replaceArgument(3, new Reference(BCEventDispatcher::class));
$container->getDefinition('trikoder.oauth2.league.repository.user_repository')
$container->getDefinition(UserRepository::class)
->replaceArgument(1, new Reference(BCEventDispatcher::class));
$container->getDefinition('trikoder.oauth2.controller.authorization_controller')
$container->getDefinition(AuthorizationController::class)
->replaceArgument(1, new Reference(BCEventDispatcher::class));
}
}

0 comments on commit 9c96a22

Please sign in to comment.