Q:

Symfony service. How to pass arguments in registration?

In my Symfony project I have manager, in which I injected two interfaces.
class ActionLogsManager
{
    private $entityManager;
    private $container;
    private $token;

 public function __construct(EntityManager $manager, ContainerInterface 
    $container, TokenInterface $token)
    {
        $this->entityManager = $manager;
        $this->container = $container;
        $this->token = $token;
    }
} 

I want to register this manager in services.yml, but i dont know how to pass these interfaces as parameters (dont know the correct syntax for this)
services:
     managers.action_log_manager:
            class: MyBundle\Managers\ActionLogsManager
            arguments: ['@doctrine.orm.entity_manager', ?, ?]

A:

Use TokenStorageInterface instead of TokenInterface. Aliases for those services are @service_container and @security.token_storage.
Your services.yml will look as follows:
services:
     managers.action_log_manager:
            class: MyBundle\Managers\ActionLogsManager
            arguments: ['@doctrine.orm.entity_manager', '@service_container', '@security.token_storage']

