wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.
Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.
Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.
Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
Http::get/set/request() now all take a new $caller parameter
which is like $fname in databases. Pass it __METHOD__ so all
of your external requests can be grouped together in profiling.
Change-Id: Ibad219452903a9678378044595cff1231bf605d8
It is inconsistent with request() and post() and there's a couple
of mistaken usages in core and extensions that think they have the
same signature.
Change-Id: I834278639a3648edec7bcb57db7bb61f456d2a92
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.
Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.
Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
The former is independent of the remaining of the SiteConfiguration
class, and as thus makes more sense to be defined as an explicit
configuration setting rather that being hidden in $wgConf.
Change-Id: I25204d37c5cfffb6953fe53e14316dc3df5b5b10
This works around <https://github.com/facebook/hhvm/issues/3702>.
We don't actually use the constant, so checking the library version
should suffice.
Bug: 70570
Change-Id: I732d8f7eb2908bae10100594f693cf7a63f8b5b1
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: I783e4dbfe5f6f98b32b9a03ccf6439e13e132bcc
- Removed spaces after not operator (!)
- Removed spaces inside array index
- use tab as indent instead of spaces
- Add newline at end of file
- Removed spaces after casts
Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I0056b4a8df243cfc0c5f25378de48f7a35170aca
It was introduced in 5d210b50 but no callers have ever been updated
so this always falls back on $wgTitle (which is usually wrong). It
only works on cURL, and is marginally useful at best.
Change-Id: Ic498108af9f466cefbd0072f94f0efa4055cd169
Issue introduced when SSL verification was added to PHPHttpRequest.
For HTTP and HTTPS stream, PHP expects "http" as the steam context
name, regardless of SSL.
Change-Id: I12c5d3d9aded6e704ebabe85b86e556fd0e99479
Follows-Up: 1c927b1df2 (Iab2bda1ebc)
Bug: 56047
Follows-up 58f71c7e9e, which assumed that the CURLOPT_CONNECTTIMEOUT_MS
constant was defined.
Bug: 58178
Change-Id: Id31a3ec56e4c7cac7d3edb2653c87be467d1a471
- Place commas correct
- Moved comments
- Add space after if/foreach/catch
- Reformat some conditions
- Removed trailing spaces/tabs
Change-Id: I40ccda72c418c4a33fcd675773cb08d971510cdb
PHP's stream context options support SSL server verification as well a CN matching and provision of
CA info.
Added options to the stream context so that the $sslVerifyHost, $sslVerifyCert, and $caInfo
parameters now work in non-CURL environments.
Change-Id: Iab2bda1ebcf20b625b019c91ae6352b5405dcc01
We already do this for the pure-PHP backend, and it's easy to
catch this single error and pass a more specific message
Change-Id: I8a81dd90b691c35c51a19f8790f06578dd067613
Per the docs, curl_error() returns a full error string, not an int
or string of an int. Just remove that and pass the error back up.
Change-Id: I7434bb2abda056fdee4d670c192b304c0cdf24f7
* Removed spaces around array index
* Removed double spaces or added spaces to begin or end of function
calls, method signature, conditions or foreachs
* Added braces to one-line ifs
* Changed multi line conditions to one line conditions
* Realigned some arrays
Change-Id: Ia04d2a99d663b07101013c2d53b3b2e872fd9cc3
0543c7b0 added a wfProfileIn() that should have been wfProfileOut()
Reorder Http::request() so that wfProfileOut() is at the same
level as the above wfProfileIn() [checked by check-vars]
Change-Id: Ia91445d792e524b9c570890397f1513af0d8cd73
Added profile calls to various functions in
MWHttpRequest as well as to the wrapper
function Http::request.
Change-Id: I7f2819a075891dbc565a7524d56e7bf077ab089a
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls
Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"
Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments
Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
(bug 42441) The previous patch unnecessarily broke backwards
compatibility in the Http::request() API, following cURL's broken
conventions for sslVerifyHost instead of the boolean interpretation
expected by all existing callers. This change reverts that one, and
fixes the bug in another way. See Ia6535f10.
Also don't bother wrapping the $this->sslVerifyHost access with isset()
since it's always set.
Change-Id: Ia4e1689249b6ac515b859ea2eca1dcff3e63098c
Changed the default value for CURLOPT_SSL_VERIFYHOST
to 2 rather than true. This makes sure that hostname
validation occurs.
Change-Id: Ia6535f1090627ef2def360bda37c22bff10c7f31
This class is not for direct initialization, and
new MWHttpRequest(...)->execute() doesn't work at all.
Change-Id: I557723c218cd8e8f27283d01141c890263da095d
@fixme is simply not recognized by doxygen whereas @todo is used to
generate a nice ... todo list!!
Change-Id: If956c0a164373126ce48b791d45c56962034eecd