Create factory for MWHttpRequest
authorStanislav Malyshev <smalyshev@gmail.com>
Tue, 16 Jan 2018 23:11:08 +0000 (15:11 -0800)
committerKunal Mehta <legoktm@member.fsf.org>
Tue, 23 Jan 2018 19:39:02 +0000 (11:39 -0800)
commitebbfe592fe02e38ab2201c0141e7468284e8ff68
treeecfd84fc5925cadb648fd0c2aaa790bda8ac42bf
parent27f996e866613c861f982c312b642d0f0304e035
Create factory for MWHttpRequest

This will allow classes that need MWHttpRequest to inject HttpRequestFactory
and thus make it overridable and testable.

Also made MWHttpRequest abstract class since it doesn't implement
execute anyway. Maybe a good idea to move execute to an abstract
method?

Change-Id: I5c0e035542ff5f791a21a95ed13bed4cea6906d0
autoload.php
includes/MediaWikiServices.php
includes/ServiceWiring.php
includes/http/HttpRequestFactory.php [new file with mode: 0644]
includes/http/MWHttpRequest.php
tests/integration/includes/http/MWHttpRequestTestCase.php
tests/phpunit/includes/MediaWikiServicesTest.php