lostisland / faraday

Simple, but flexible HTTP client library, with support for multiple backends.
https://lostisland.github.io/faraday
MIT License
5.72k stars 972 forks source link

deprecate three methods for version 2.0 #1446

Closed hyuraku closed 2 years ago

hyuraku commented 2 years ago

Description

apply Faraday#deprecate to three deprecated methods for version 2.0.

related with https://github.com/lostisland/faraday/pull/1438

Todos

List any remaining work that needs to be done, i.e:

Additional Notes

Optional section

iMacTia commented 2 years ago

Thank you @hyuraku, one thing I'm not entirely happy about is that the existing warnings not only communicate which method has been deprecated and from where it was called, but they also provide a hint as to how to address them, and a link to the relevant documentation. Simply replacing them with Faraday::Deprecate will make that information disappear 😢

Do you think it would be possible to extend #deprecate so that it accepts an additional (optional) parameter that we can use to provide a "custom message" on some deprecation warnings, and use that new parameter in these cases?

hyuraku commented 2 years ago

@iMacTia

Do you think it would be possible to extend #deprecate so that it accepts an additional (optional) parameter that we can use to provide a "custom message" on some deprecation warnings, and use that new parameter in these cases?

I guess it's better to add custom_message as the args to Faraday::Deprecate#deprecate, How about?

end

iMacTia commented 2 years ago

Yeah, that would be perfect to share the link to the documentation or any other free-text valuable context on the deprecation 🙏!

hyuraku commented 2 years ago

@iMacTia Could you review this PR again?