Closed Gonzalo1987 closed 5 years ago
Hello @Gonzalo1987 . I think you have 2 options:
1) Resolve this by extending Symfony\Bundle\FrameworkBundle\Controller\Controller
instead of ymfony\Bundle\FrameworkBundle\Controller\AbstractController
.
2) Use autowire as described here: https://github.com/8p/EightPointsGuzzleBundle/blob/master/src/Resources/doc/autowiring-clients.md
I'll autowire it, (since Controller is deprecated), Thank you very much, very useful!!!
I'm feel a little stupid right now, but I don't know what is happening. When I try use one of the clients configurated in the yaml file I get:
Service "eight_points_guzzle.client.api_exchange" not found: even though it exists in the app's container, the container inside "App\Controller\DefaultController" is a smaller service locator that only knows about the "doctrine", "form.factory", "http_kernel", "parameter_bag", "request_stack", "router", "security.authorization_checker", "security.csrf.token_manager", "security.token_storage", "session", "templating" and "twig" services. Try using dependency injection instead.
What I'm doing wrong?
The bundle seems well configured. I'm cleared the cache and installed the assets.
Thanks.