I'm new to Symfony and try to use the ClientManipulatorInterface service from gos/web-socket-bundle. My problem is that Symfony returns an error even if I configure the argument manually.
I always get this error: Cannot autowire service "Foo\Bar\Controller\testTopic": argument "$clientManipulator" of method "__construct()" references interface "Gos\Bundle\WebSocketBundle\Client\ClientManipulatorInterface" but no such service exists. You should maybe
alias this interface to the existing "gos_web_socket.websocket.client_manipulator" service.
Here is my service.yaml:
services: test_topic: class: Foo\Bar\Controller\testTopic tags: - { name: gos_web_socket.topic } arguments: - '@gos_web_socket.websocket.client_manipulator' This is my PHP class:
namespace Foo\Bar\Controller; use Gos\Bundle\WebSocketBundle\Client\ClientManipulatorInterface; use Gos\Bundle\WebSocketBundle\Topic\TopicInterface; class testTopic implements TopicInterface { /** * @var ClientManipulatorInterface */ protected $clientManipulator; /** * testTopic constructor. * @param ClientManipulatorInterface $clientManipulator */ public function __construct(ClientManipulatorInterface $clientManipulator) { $this->clientManipulator = $clientManipulator; } ...