* Add PHP type hints where possible.
* Remove @var, @param and @return if redundant to type declaration.
* Use explite type cast to int for boolean array index.
Change-Id: I3531b3f735327b5c427f1fc434adfb495b1c743f
This change depends on the Scribunto change
I74fd43f7920c8772e9078f745ac6062d5461a7f1 included in REL1_40.
Depends-On: I74fd43f7920c8772e9078f745ac6062d5461a7f1
Change-Id: Id4156a8934583971df6b449d13f3d8eb6cee6368
Add parser functions #timef and #timefl, giving access to the standard
date/time formats of any language.
StubObject::unstub() is no longer required since the user language is
unstubbed in ParserOptions::__construct().
Bug: T223772
Change-Id: If158f45aad67ff017f9cd15889915b226e03f50c
Found usage of isset() on expression self::$mExprParser that appears to
be always set. isset() should only be used to suppress errors. Check
whether the expression is null instead.
See https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset
Change-Id: Idcc51fc215fb727e84aaba5ac2510c052ce6b4d6
Cannot use the interface as the required version is not reached yet.
Cannot bump due to use in fundraising
Bug: T271022
Change-Id: I78771f948d4d1e03fc7565525f562c61af9d749a
timeout while converting timestamps should be a timeout for the whole
parse of that wikitext and not hidden by a invalid time.
Just let the exception bubble up to the caller
See ca71e69f for more information
Change-Id: I0d0decdeb5f4c14d009c6df2ff37920100ba320f
Manipulating $wgHooks is deprecated and unreliable.
Use HookContainer instead.
Needed-By: Iddcb760cf8961316d6527e81b9aa968657d8354c
Change-Id: I413cd2ae43fe4b13917d61a50e190b536fce7279
It's impossible that explode() returns an empty array. This is dead
code.
Also add tests for the previously untested #titleparts function to
make sure this patch doesn't change any behavior. Including weird
usages with negative numbers.
Change-Id: Ib0d2503fdb0900bf6db3ebbc26d2ff648dbfc86d
Personally I find the code much more readable when the private
helper method returns a bool.
Note this patch is intentionally tiny and focusses exclusively on
this one detail. There are many parser tests to prove that nothing
changed.
Change-Id: Ibe07c27aab9cbfc4705769820be679cd54acb79b
Parser::getFunctionLang() is being deprecated. These two functions
have been identical since 7df3473cfea59df53debb7a9eefffed8a7f20fb3
in MW 1.19 (2012) and this extension already requires MW >= 1.35.
Bug: T318860
Change-Id: I87a7ceedce173f6de4bb6722ffe594273c7b0359
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