Commit graph

8 commits

Author SHA1 Message Date
Umherirrender
ad776c7d5f Use ::class to resolve class names in maintenance scripts
This helps to find renamed or misspelled classes earlier.
Phan will check the class names

Change-Id: I1d4567f47f93eb1436cb98558388e48d35258666
2018-01-23 17:40:16 +00:00
daniel
eb46307b00 Introduce top level service locator.
The service locator, MediaWikiServices, is intended to facilitate
"manual" dependency injection in static entry points.

See also the Dependency Injection RFC T384 and Service Locator
RFC T124792 for details.
The following key points were implemented according the
discussion surrounding these RFCs:

* a configurable DI container that allows extensions to add and replace services.
* no auto-wiring, since it's prone to add confusion in large and complex applications.
* no 3rd party framework, since they typically do too much.

The following services in MediaWiki core are made accessible via the service locator
mechanism to showcase the bootstrapping mechanism:

* ConfigFactory and MainConfig
* SiteLookup and SiteStore

However, the implementation of these services was not yet converted to using proper DI
throughout the code.

Bug: T124792
Change-Id: I3c25c0ac17300d3dd13e1cf5100558a605eee15f
2016-04-02 18:07:28 +03: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
Max Semenik
59db24e90b Use addDescription() instead of accessing mDescription directly
Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
2016-01-30 01:28:32 -08:00
umherirrender
54c1e18eec Remove various double empty newlines
The double empty newline is not needed between functions, variable or at
end of file

Change-Id: Ib866a95084c4601ac150a2b402cfa184ebc18afa
2015-12-27 18:55:12 +00:00
paladox
dca469bb87 Fix phpcs warnings
Bug: T102614
Change-Id: Iecea365f83bbb0c336b58f1cfdebfc9b1112087e
2015-06-18 20:13:37 +00:00
umherirrender
d8821f2b0b Fixed spacing
- Removed space after casts
- Removed spaces in array index
- Added spaces around string concat
- Added space after words: switch, foreach
- else if -> elseif
- Removed parentheses around require_once, because it is not a function
- Added newline at end of file
- Removed double spaces
- Added spaces around operations
- Removed repeated newlines

Bug: T102609
Change-Id: Ib860222b24f8ad8e9062cd4dc42ec88dc63fb49e
2015-06-17 20:22:32 +00:00
daniel
85e2086369 Maintenance script for importing site info.
Bug: T87176
Bug: T87183
Change-Id: I3936417bc79e08cf3d04270158a6e483b5515246
2015-02-18 18:39:14 +01:00