From 0a85093cfd1877f261fcf464b35a4ddefc28017e Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Mon, 7 Feb 2022 11:22:30 +0100 Subject: [PATCH] docs: UPGRADE Note #dependency removed in 2.0 This adds a missing explanation to the UPGRADE document. Anyone searching for `dependency` should be able to find this section. --- UPGRADING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UPGRADING.md b/UPGRADING.md index 02455fb84..f2e423eed 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -113,6 +113,12 @@ Instead, you should be using the equivalent middleware, as explained in [this pa For more details, see https://github.com/lostisland/faraday/pull/1306 +### The `dependency` method in middlewares has been removed + +In Faraday 1, a deferred require was used with the `dependency` method. + +In Faraday 2, that method has been removed. In your middlware gems, use a regular `require` at the top of the file, + ### Others * Rename `Faraday::Request#method` to `#http_method`.