| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
|
|
|
|
|
|
|
|
| |
The function is not defined in the extends interfaces to inherit
documentation from.
Follow-Up: I8334cc89dcf0f293298b82e004116be50a90f0d1
Change-Id: I14b2adfaa3c859ce7b196fc639b0974bbbf01834
|
|
|
|
|
| |
Bug: T353458
Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
|
|
|
|
|
|
|
|
| |
The idea is that all formatters that need the user language or
other request specific context should be instantiated by
FormatterFactory.
Change-Id: I8334cc89dcf0f293298b82e004116be50a90f0d1
|
|
|
|
| |
Change-Id: Ie71bf8f949c87533da254c91cdd688d5be27fe07
|
|
|
|
|
| |
Bug: T166010
Change-Id: I4066885a7ea071d22497abcdb3f95e73e154d08c
|
|
|
|
|
| |
Bug: T166010
Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
|
|
|
|
|
|
|
| |
This has been approved as part of RFC T166010
Bug: T321882
Change-Id: I6bbdbbe6ea48cc1f50bc568bb8780fc7c5361a6f
|
|
|
|
|
|
|
|
|
|
| |
And namesapce them:
- StreamFile
- OutputHandler
- OutputPage
Bug: T321882
Change-Id: Iedf8d88c595e580f2d8f0734c92aa5c45618ba33
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922.
Reason for revert: T166010#8349431
Bug: T166010
Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequest
- WebRequestUpload
Bug: T166010
Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
|
|
|
|
|
|
| |
Hard-deprecated since a6fe660.
Change-Id: Id26aabcb6cbcedfe45224af161a998bda3aff451
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows similar commits to the objectcache, rdbms, filerepo,
jobqueue components and other areas [1].
* Remove duplicate descriptions from file blocks in favour of class
doc blocks. This reduces needless duplication and was often
incorrect or outdated, and helps (ironically) to make the file header
more consistently visually ignorable.
* Remove `ingroup` from file blocks in class files as otherwise
the file is indexed twice (e.g. in Doxygen) which makes navigation
more messy.
* Fix non-standard `@unstable for implementation` annotations
in favour of `@stable to type` as per T257789 and
<https://www.mediawiki.org/wiki/Stable_interface_policy>.
While at it, fix the only other outstanding uses of `@stable for`
in core as well in a handful of context/, logging/ and search/
files.
[1] https://gerrit.wikimedia.org/r/q/message:ingroup+owner:Krinkle
Bug: T257789
Change-Id: Ided3c5ab69e1b587b1b76a3c97a7cdb88f21e130
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method is dependent on, and inherently must depend on, all of
Title, WikiPage, and WebRequest. And, like Title and WikiPage,
which also have getters in RequestContext, Action is also derived
from a query parameter that is widely recognised in almost all
web requests to index.php.
The status quo in core and extensions, is to obtain this value
via Action::getActionName(), which as a static method that bypasses
dependency injection and also has the problem of not being cached.
Caching it within ActionFactory seems hard and awkward, due to
varying by context.
In change I61d66211bd (22f9a32853f) a cached wrapper method was added
internally to the Skin class. In change I8cbc4bba4d248d9 (235820d631)
another cached wrapper was added in the Gadgets extension.
This change takes this approach further by making it a stable public
method on RequestContext.
To facilitate testing and to offer basic confidence in this working
correctly, this commit also adopts the new method in two place that
are considered "safe" (Skin, and OutputPage). Both of these are
called relatively late in the PHP proccess and well after any Setup
code and overrides (such as in MediaWiki.php), during which it is
more complex to call this. I'll audit and update those in a subsequent
change.
Change-Id: I1e259b54dca48a32be5a8c6cbb8eb69aec2da115
|
|
|
|
| |
Change-Id: Idf68f1cc63fb2e01e004ff353fcda026fa4ec10f
|
|
|
|
|
|
|
| |
NOTE: this should be backported to 1.36 before the RC0 release!
Bug: T275768
Change-Id: I86c1f6e497dcda820944be5adfd80aed7b9c63bb
|
|
|
|
|
| |
Bug: T271460
Change-Id: If1038c94ccf8f3e59b5242f5c33b66f076c60816
|
|
|
|
|
|
|
|
|
| |
Per the Stable Interface Policy, PHP interfaces should not be
directly implemented by extensions, unless they are marked to be safe
for that purpose.
Bug: T247862
Change-Id: Idd5783b70fc00c03d57f5b1a887f0e47c4d7b146
|
|
|
|
|
|
|
|
|
|
| |
I'm also removing obsolete short comments that don't add anything to
whats already obvious from the method header. For example, I really don't
need a comment to understand that a method that's called "setUser" and
accepts a parameter named "$user" of type "User" is meant to "set the
User object". I mean, how more obvious can it be? ;-)
Change-Id: Ib079108457a5aa2a6896e95837542ab93b465144
|
|
|
|
| |
Change-Id: Ia24dbf015f2b4781683ca980a460d0ac3e85674e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up I2874175647e (7fdc3d09a3b).
* Avoid "MediaWiki" in class names. If unavoidable, always camelcase.
* Use a more descriptive name, matching the implementing the class ("Buffering").
* Use "I" prefix for consistency with other MediaWiki-provided interfaces.
(Avoid "Interface" suffix, which is foreign to MediaWiki and is only used
in the StatsdClient namespace, which this interface is not in).
Bug: T166354
Change-Id: I06de59122625f9c23e7c1a1bfa69a7ddabbf379e
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: calling msg() with no parameter was never supported,
doing this on a RequestContext for example would result in:
PHP Warning: Missing argument 1 for wfMessage() ...followed
by a bunch of fallout.
So this patch only formally declares what was already a
requirement in reality.
Change-Id: I1864afb8bcc641698689828914949a06506d8f3a
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following changes are added:
- Created MediawikiStatsdDataFactory interface
- Added hasData() method to see if there are any data to send
- Added getData() method to fetch data
- Made service infrastructure use MediawikiStatsdDataFactory interface
- Made wfLogProfilingData() use MediawikiStatsdDataFactory interface
- Added capability to enable/disable buffering collector
Bug: T166354
Change-Id: I2874175647e987996a9a399829b3319674471aaa
|
|
|
|
| |
Change-Id: Iaf89d5d7887f766064266874ea7ba73362531ed2
|
|
|
|
|
|
|
|
|
| |
* Add `Timing`, an interface which mimics the W3C User Timing API.
It provides a canonical way to store and retrieve markers (timestamps)
and measures (timestamps + duration).
* As the initial use-case, use it to record 'requestShutdown'.
Change-Id: I36b29162ffcc091406df025463b0e2797e52f19a
|
|
|
|
| |
Change-Id: I2a382ee8498eafd9fe045550dd9c1f61a8933926
|
|
|
|
| |
Change-Id: I4cc922c61f77bbb7cd4ece94f28d927c4753c24e
|
|
|
|
| |
Change-Id: I9b654a12578758471978ffd1e1ae20476aeeaa0d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a metric data service object to the IContextSource interface,
with full support for StatsD meters, gauges, counters and timing metrics, via
the liuggio/statsd-php-client, which this patch also introduces.
Usage example:
$stats = $context->getStats();
$stats->increment( 'resourceloader.cache.hits' );
$stats->timing( 'resourceloader.cache.rtt', $rtt );
The metrics are flushed to a StatsD server, which may be specified via the
'StatsdServer' configuration key. If no such configuration key exists, the
metrics are discarded.
The StatsD client supplants MediaWiki's StatCounter class. wfIncrStats()
will continue to work, but it will delegate to the StatsD data object.
Change-Id: Ie10db1c154d225971398e189737de7c560bf0f90
|
|
|
|
|
|
| |
* Also removed some duplicated comments
Change-Id: I2c967d0f3219f3533378ecd5f9fccc40c8f9b219
|
|
|
|
| |
Change-Id: I94c3df814c06c54c071f371101882dcc71c99417
|
|
|
|
|
|
| |
That can happen if wgTitle is null.
Change-Id: I3d8aab232d408e75afb8be82ca714bf5c4fe2427
|
|
|
|
|
|
|
|
| |
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.
Change-Id: I8c9f30128b46086064326708a4878228ba459447
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allows configuration options to be fetched from context.
Only one implementation, GlobalConfig, is provided, which
simply returns $GLOBALS[$name]. There can be more classes
in the future, possibly a database-based one. For convinience
the "wg" prefix is automatically added.
Ironically, this adds the $wgConfigClass global variable
which is used to determine which implementation of Config
to use by default.
The ContextSource getConfig and setConfig methods were introduced
in I23194d1ba (1.23), but have no uses in Gerrit, so they can safely
be re-purposed.
Change-Id: I13baec0b6d4ea7badf20b9c5f9b40846348838e4
|
|
|
|
|
|
|
|
|
| |
First step of providing configuration without relying on globals.
You can use this in your code now as follows:
$myvar = $context->getConfig()->get( 'wgMyVar' )
Change-Id: I23194d1ba747a9e0d925154ae065cbd612b4f591
|
|
|
|
|
|
|
|
|
| |
Most have it already:
https://doc.wikimedia.org/mediawiki-core/master/php/html/deprecated.html
Ran a find/replace on "@deprecated \d" to fix the odd ones.
Change-Id: I5217aaf75264a0036b5426cd8536116b4bb8f535
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Renamed WebRequest::exportUserSession -> RequestContext::exportSession.
Updated the only callers of this new function.
* Init the user with User::newFromId() instead of relying on the session
(which breaks when things like CentralAuth are enabled).
* Made RequestContext::exportSession() include the user ID.
* Removed now-redundant user ID checks in upload jobs.
* Added unit tests for the session import function.
Change-Id: I543e6766f7a8a828ea5d270328c3bc7738c6fe94
|
|
|
|
| |
Change-Id: I1896d7b1ab5d11d3a609fd97db7c503ad6c590e5
|
|
|
|
|
|
|
| |
know whether getWikiPage() can be safely called
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108902
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108787
|
|
|
|
|
|
|
|
|
|
|
|
| |
avoid creating a new object each time and thus avoiding database queries to load the state of the object
* Added Article::getPage() as accessor to the WikiPage object so that it can be set in the context from MediaWiki::initializeArticle()
* Use it WikiPage::main() to call doViewUpdates()
I'm doing to this now so that I can revert r105790 and use the WikiPage object before the 1.19 release
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/108274
|
|
|
|
|
|
|
| |
fatal that no-one bothered to fix.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/105205
|
|
|
|
|
|
|
| |
I'll be amazed if this doens't break any tests.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/103817
|
|
Update the AutoLoader too. This is also a follow up to r97161 since I forgot to add the AutoLoader line.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/97179
|