Commit graph

11 commits

Author SHA1 Message Date
Daimona Eaytoy
518a5da533 Replace deprecated MWException
Bug: T328220
Change-Id: I0408575ee71e58d1c9e9ebedabab35bd3813f515
2023-06-12 12:27:49 +00:00
Timo Tijhof
f21caa41d3 externalstore: Improve overall documentation
* Consolidate various duplicate docs to the main entry point.
  Especially the duplication that followed after ExternalStoreFactory
  and ExternalStoreAccess were introduced with ExternalStore
  left as deprecated wrapper.

* Officially mark ExternalStoreFactory as internal, pointing
  to ExternalStoreAccess instead. And document why the latter exists,
  since it seems all its methods could trivially move to the factory
  class. Follows-up I40c3b553, where it was explained that the factory
  is meant to be an internal implementation detail, with the access
  class meant to resemble ExternalStoreMedium.

* Use consistent terms for "protocol", "location" and "object"
  (reduce use of words like medium, backend, type, blob, revision,
  etc. within this code).

* Document that ExternalStore is fundamentally designed as an
  append-only store (per T247383).

Bug: T247383
Change-Id: I1094af7d35a14f9e47b8791f3e4cc888e8cbfc7f
2021-12-15 02:03:47 +00:00
Umherirrender
44fd53fee3 Using @return never documentation on always-throw-function
This helps phan to detect unreachable code and also impossible types
after the functions.
It helps phan to avoid false positives for array keys
when the keys are checked before

Bug: T240141
Change-Id: I895f70e82b3053a46cd44135b15437e6f82a07b2
2021-09-07 17:29:03 +02:00
Aryeh Gregor
9018579681 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
2019-05-06 12:07:26 +03:00
Jayprakash12345
011711e79f Fix typo accessable --> accessible
Change-Id: I239a15e1bc3a311d9284285a04094afae331111d
2018-03-14 05:25:34 +00:00
Aaron Schulz
656f60c154 Add ExternalStoreMedium::isReadOnly() method
Use this to abort out of store() calls early

Bug: T187942
Change-Id: I9334d36e8bc3e4589775471eee03be4f4a3119a3
2018-02-22 08:15:20 -08:00
Umherirrender
f739a8f368 Improve some parameter docs
Add missing @return and @param to function docs and fixed some @param

Change-Id: I810727961057cfdcc274428b239af5975c57468d
2017-09-10 20:32:31 +02:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Chad Horohoe
c33f4de066 Profile all external HTTP requests from MW
Change-Id: Ie980b080da2ef21ec7d9fc32f1accc55710de140
2015-03-03 20:54:30 -08:00
Aaron Schulz
a37f67909f [ExternalStore] Refactored external store classes to use a base class.
* Added ExternalStoreMedium base class
* Moved up two functions in ExternalStoreDB
* Various documentation tweaks

Change-Id: I6790aab7799609422e7af4fb31d2ad60610298ec
2013-01-25 15:54:15 -08:00
Aaron Schulz
cbc28d41ae Moved ExternalStore stuff to a /externalstore subdir.
Change-Id: If631040d8242354734280403258ed5d51542728d
2012-12-10 12:43:42 -08:00
Renamed from includes/ExternalStoreHttp.php (Browse further)