aboutsummaryrefslogtreecommitdiffstats
path: root/includes/http/GuzzleHttpRequest.php
diff options
context:
space:
mode:
authorAryeh Gregor <ayg@aryeh.name>2019-04-15 16:23:02 +0300
committerAryeh Gregor <ayg@aryeh.name>2019-05-06 12:07:26 +0300
commit9018579681d345a0e63854e12ddc87a47bf171f3 (patch)
tree244508a18e9405541776c14e00016e7b6c306b89 /includes/http/GuzzleHttpRequest.php
parent427fbee7343c2955ad1e666be6a69c30a2234e11 (diff)
downloadmediawikicore-9018579681d345a0e63854e12ddc87a47bf171f3.tar.gz
mediawikicore-9018579681d345a0e63854e12ddc87a47bf171f3.zip
Deprecate the Http class
All methods got moved to HttpRequestFactory or MWHttpRequest or dropped. I made the return value of the new HttpRequestFactory::request/get/post methods null on error instead of false, so that when we drop PHP 7 support, we can use a "?string" return value. This could theoretically change behavior of code that was switched from the old Http methods, but probably won't. I kept the old behavior for the deprecated methods. I changed the default value of $wgHTTPProxy from false to ''. This way it should be usable directly without a trivial wrapper method. For the benefit of anyone who might have set it to false in LocalSettings.php, I also recommend casting to string just in case. Http::$httpEngine is deprecated. Eventually it will be removed along with the curl and PHP engines, leaving only the Guzlle engine. I also added deprecation of MWHttpRequest::factory, which occurred in 1.31, to the release notes for 1.34. Now hopefully we can hard-deprecate it in another couple of versions. Bug: T214390 Change-Id: I2a316a758d793857f248bd251b90f5e9a6440e3a
Diffstat (limited to 'includes/http/GuzzleHttpRequest.php')
-rw-r--r--includes/http/GuzzleHttpRequest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/http/GuzzleHttpRequest.php b/includes/http/GuzzleHttpRequest.php
index e6b289206a3f..3af7f56a5d16 100644
--- a/includes/http/GuzzleHttpRequest.php
+++ b/includes/http/GuzzleHttpRequest.php
@@ -45,7 +45,7 @@ class GuzzleHttpRequest extends MWHttpRequest {
/**
* @param string $url Url to use. If protocol-relative, will be expanded to an http:// URL
- * @param array $options (optional) extra params to pass (see Http::request())
+ * @param array $options (optional) extra params to pass (see HttpRequestFactory::create())
* @param string $caller The method making this request, for profiling
* @param Profiler|null $profiler An instance of the profiler for profiling, or null
* @throws Exception