kamermans / guzzle-oauth2-subscriber

OAuth 2.0 Client for Guzzle 4, 5, 6 and 7 with PHP 5.4 - PHP 8.0 - no more dependency hell!
MIT License
140 stars 31 forks source link

Guzzle 8: The getConfig Method from ClientInterface will be removed #29

Closed alexz707 closed 1 year ago

alexz707 commented 3 years ago

Hi! Do you already have some migrations plans for the getConfig method which will be removed in Guzzle 8? It's already marked as deprecated and as far as I have followed the messages from the guzzle team there won't be an alternative to access the "real" config of the client.. Thanks & Regards Alex

kamermans commented 3 years ago

Hi Alex, I have not followed this change, so I do not have a migration strategy yet. Do you have some idea of how to approach this? I'm happy to accept a PR.

alexz707 commented 3 years ago

Currently I don't have an idea, that's why I wrote this ticket ;)

That's the info I found: https://github.com/guzzle/guzzle/issues/2514

I'm not sure where to retrieve this info. Only way would be the config with which guzzle gets configured but that's not a nice way because it's not really flexible.

Regards Alex

kamermans commented 3 years ago

Ok, thanks, I'll look into it and see what I am using getConfig() for.

genesiscz commented 1 year ago

Any update?

kamermans commented 1 year ago

I'll take a look at it right now, but as far as I can tell, Guzzle 8 is not on the horizon.

kamermans commented 1 year ago

@genesiscz, can you try my PR to see if it works in your environment? (all the tests pass)

composer require "kamermans/guzzle-oauth2-subscriber":"get-config-deprecation"

It seems I didn't even need getConfig() in the first place since I was just using it to get the base_uri from Guzzle, and leaving the uri blank in a PSR7 request causes the client to use its base_uri anyway :)