Commit graph

17 commits

Author SHA1 Message Date
Umherirrender 67a191f41a build: Move exclude from composer.json to .phpcs.xml
Exclude the whole lib/ve/* folder instead of the node_modules folder

The mediawiki ruleset sets exclude the node_modules folder in root
since version 19.0.0 (ab87d2eb60)

Change-Id: I585cc0524c179b2a9b472300a39d2d7c7b3ba383
2024-10-18 20:26:46 +02:00
Bartosz Dziewoński aed5bcf7d0 ApiVisualEditor: Remove $wgTitle hack, set page for {{PAGENAME}} when needed
Depends on core changes I242e042317 and I6e9356a6cc to set the context
page for messages generated in Title::getEditNotices() and
LogEventsList::showLogExtract() too.

Set the context page for other messages whose overrides on Wikimedia
wikis commonly depend on it, which I checked using Global Search, e.g.
https://global-search.toolforge.org/?q=PAGENAME&regex=1&namespaces=8&title=Editingold

Depends-On: I242e042317a1e16c8d51edbf7800c8b7d70d468e
Depends-On: I6e9356a6cc3b9df9b508c3d37a0b9b75d6825efd
Bug: T300184
Change-Id: I0746618b1f6da3e5fd213d8adad9b1f4ec2fe23b
2022-02-28 23:43:54 +00:00
Thiemo Kreuz a8f835c30a Raise PHP coding standards in this codebase a bit
Re-enabling some specific rules that are disabled in the upstream
MediaWiki coding standard for several reasons.

Change-Id: I6922995098f9af21e62e1b40d20fabd4b5d74ef7
2021-11-08 13:34:29 +01:00
Thiemo Kreuz ad014c834d Fix a series of minor style issues in PHP code
* Mismatching capitalization.
* Unused pieces of code.
* Properties that can be constants.
* Use $this->getConfig() in special pages.

Change-Id: Ia7e2c438c5ddd3c770070701e4cbdfc79fccf009
2021-06-03 15:55:38 +02:00
libraryupgrader 738c3b3a34 build: Updating eslint-config-wikimedia to 0.18.2
Additional changes:
* Dropped .php5 and .inc files from .phpcs.xml (T200956).

Change-Id: I869e10c268d28dc059aecb11ea941c2d928e400c
2021-03-05 04:41:47 +00:00
libraryupgrader 7248ad6332 build: Updating mediawiki/mediawiki-codesniffer to 32.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate
* MediaWiki.Commenting.PropertyDocumentation.WrongStyle
* MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage

Additional changes:
* Removed globals `OO`, `require`, included via `wikimedia/mediawiki` profile (T262222).

Change-Id: If161f46db0a1f35126fecec141e29d15fa4f2532
2020-10-28 17:50:11 +00:00
Thiemo Kreuz 1230e25cbf Add missing constant visibility keywords
Not used outside of this class. Confirmed via CodeSearch.

Change-Id: I8ffed9ed88bc60e7529d277df5b474d85437ed6e
2020-09-09 16:59:39 +02:00
Umherirrender a7497703a7 Fix new documentation sniffs
Change-Id: If9fc2d1d29aefdcb61a5f69c28f7d50c86b3ac4a
2020-01-10 16:28:16 -08:00
libraryupgrader 6afa14fe4d build: Updating mediawiki/mediawiki-codesniffer to 29.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag

Change-Id: If59d450236a7d1afa3c6a05536abea819535f984
2020-01-10 17:51:43 +00:00
James D. Forrester 2479f5c7f8 Drop use of wgParser, replaced in 1.32 and to be removed in 1.35
Bug: T160811
Change-Id: Id7332a19d64d83bcbccfd3ac89464dfea593cdc2
2019-10-28 20:10:14 +00:00
James D. Forrester dec54cf56e build: Upgrade mediawiki-codesniffer to v28.0.0
Change-Id: I23702d16eee09292b63051f94103a3bca3b1dd13
2019-10-11 12:42:23 -07:00
James D. Forrester 358d2fa01c .phpcs.xml: Drop unnecessary exclusions
Already ignored, or don't have any PHP files.

Change-Id: I644148617e2d6ce2fdb1d406ca2cc9c2b5aabbd7
2019-04-05 17:43:18 -07:00
libraryupgrader 36ef6d856f build: Updating mediawiki/mediawiki-codesniffer to 24.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgParser
* MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle

The following sniffs was renamed:
* MediaWiki.VariableAnalysis.ForbiddenGlobalVariables.ForbiddenGlobal$wgTitle

Change-Id: Iabe2a787bae7fe299bed548c0097613ff5493a0d
2019-02-06 18:33:13 +00:00
James D. Forrester 31f667ccf7 doc: Document all public and protected PHP functions
Also move the maintenane script to a name that makes
MediaWiki.Files.ClassMatchesFilename.NotMatch not error,
and use the more restrictive licence tag usage for
MediaWiki.Commenting.LicenseComment.InvalidLicenseTag.

Change-Id: Ifa5518cd590ae83c6fd76f1dbb5a2ce40de4b119
2018-03-28 12:50:44 -07:00
libraryupgrader 0c6e488c2f build: Updating mediawiki/mediawiki-codesniffer to 17.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.LicenseComment.InvalidLicenseTag

Change-Id: I9e8470d0a967fdab4b410aa999cc98d52fb780e8
2018-03-28 18:28:05 +00:00
James D. Forrester 1c6e9f216d phpcs: Don't try to be smart about excluding VE, it doesn't work
Change-Id: I3ca8b5c408a9331e4d5daada6a6c1624e30667e5
2018-02-07 12:31:09 -08:00
libraryupgrader d87af9e4c8 build: Updating mediawiki/mediawiki-codesniffer to 14.1.0
And moved phpcs.xml to .phpcs.xml (T177256).

Change-Id: If86bc95b7dfb48180e741c729e9ded195992908b
2017-10-21 03:00:17 +00:00
Renamed from phpcs.xml (Browse further)