The parameters passed to these parser hook handler functions have
guaranteed types. They are either strings or an array of PPNode
objects, depending on the SFH_OBJECT_ARGS flag. When a parameter is
missing the default value from the function header is used.
Change-Id: Ie0196f43f94cf002110c07ad2de30adfa6b77179
This way my IDE (in this case PHPStorm) can actually follow these
references. Strg+click brings me straight to the function, and back.
I assume other tools, linters and such might benefit the same way.
I think this is worth having a bit more duplication.
Change-Id: I16260443e0f1513b9a4715874a513c7a399b5d92
`#ifexist` used to only record media links if the file existed, now it does it either way.
Bug: T245965
Change-Id: Ida5dd30669fbc3471d792fd4c202bb0ff74737ec
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0
Change-Id: Ifaca144ccfd753ea00d1dbba0d12941b0050e2a4
The replacement, Parser::getOutput(), has been in MediaWiki for over a
decade (since 1.12.2 in 2008).
Bug: T275160
Change-Id: I4f4f7b0118470741a6cdaba562f858e425fcf350
Had to change a bit how ExprError is used, to prevent having to turn unit
tests into ingergation tests, adding 5 seconds to run time.
Change-Id: Id4e158f3a4418d320b1c0bdac834ebbba03762af
* Force type hints
* Documentation
* Give links to documentation on mw.org to make high-level understanding of
what each function does easier.
Change-Id: I7708343540b7980e57b68ce9b2d9816d2aee710f
They're a rudiment from the time when the extension had to be compatible
with both SFH_OBJECT_ARGS supporting and not versions of MediaWiki.
This is in the past, so unify them now by merging and or deleting the
old versions. The resulting functions don't end with "Obj" anymore.
One "common" function was left alone to be refactored at a later time,
however I've renamed it and made private.
Change-Id: Ice97e587bf7cc0469476c2e53268d2774ddfdd04
Instead of using a global variable specific to Wikimedia CI, always enable
string functions when running parser and PHPUnit tests.
Bug: T180192
Bug: T200650
Change-Id: I27764036e42800be437d69d96ce2b7bc1b1f7cb3
The mb_strpos() function throws E_WARNING if the offset is longer
than the length of the string.
Bug: T209600
Change-Id: Ib4296ba136eaf5c8461681e9d5f108118b2494f4
"continue" statements in a switch are equivalent to "break". In PHP 7.3, will generate a warning.
Also change the indentation.
Bug: T206977
Change-Id: I8ad0ef6508e73bcca7dabfe2e88d661dd409bdfb
This is deprecated in 1.32. Bump minimum requirement of MediaWiki to
1.32 since this is a tarball-bundled extension.
Depends-On: Id8a92d57743f790b7d8c377c033cef38d1bb24de
Change-Id: Ie18c7c97405124ccaa3922b4a25fa7b40496039f