8p / EightPointsGuzzleBundle

⛽️ Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony
MIT License
440 stars 71 forks source link

Client autowiring #227

Closed rrajkomar closed 6 years ago

rrajkomar commented 6 years ago

Since autowiring is obviously a big thing that will most likely stay :) maybe now would be a good time to start thinking about whether it'd be possible to move away from the current client configuration to something more autowiry-like.

What's your take on this subject ?

gregurco commented 6 years ago

Yep, but autorwire is more related to one-class services. In out case we can have 5 clients and all 5 clients will be instance of the same class and in this case it's impossible to autowire without some additional configuration. Also we have an article where we described how to use autowire in context of this bundle: https://github.com/8p/EightPointsGuzzleBundle/blob/master/src/Resources/doc/autowiring-clients.md

gregurco commented 6 years ago

@rrajkomar did the article answer your question? Can we close the issue or do you have any suggestions?

rrajkomar commented 6 years ago

Sorry. Well from youranswer I guess the only way to move away from the current way would be making the Client class abstract and therefore induce a bc break. We might talk about this again later on but it can be closed for now.