Commit graph

10 commits

Author SHA1 Message Date
Kunal Mehta
e0193327bd Fix MediaWiki.Commenting.LicenseComment.InvalidLicenseTag errors
Change-Id: I936c3f5fca1a0061f215e80469f5d882cb32ee29
2018-05-23 16:23:42 -07:00
Umherirrender
69dbaf3f88 build: Updating mediawiki/mediawiki-codesniffer to 17.0.0
Change-Id: Ib494b47c54fe6354d166055b1e1b31d3583bb992
2018-03-29 21:53:10 +02:00
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
Bryan Davis
9e34eeff23 Maintenance: add fatalError() method
Deprecate the second argument to Maintenance::error() in favor of a new
Maintenance::fatalError() method. This is intended to make it easier to
review flow control in maintenance scripts.

Change-Id: I75699008638f7e99b11210c7bb9e2e131fca7c9e
2017-11-21 21:34:16 -07: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
Max Semenik
59db24e90b Use addDescription() instead of accessing mDescription directly
Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
2016-01-30 01:28:32 -08:00
Vivek Ghaisas
96c93a8cce maintenance/exportSites: Fix minor whitespace issue
Opening parentheses should be followed by a single space.

Change-Id: I9d73334c3c79bf5277248c56e0f146a91938b35c
2015-06-20 23:49:49 +03: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
ca3be1e13d Maintenance script for exporting site definitions
Bug: T87178
Change-Id: I40fd6aaa8f47bad3d595d5c190036bf04d13c12a
2015-02-20 12:09:34 +01:00