MediaWiki 1.36 requires php-intl, but missing it currently
throws exception instead of graceful failure
Change-Id: Id18c45ce4da85105e4c94164cf2c6a4c5536a540
Instead of refusing to run MediaWiki at all, just fix the test which
fails on 7.4.3.
* Add ParserOptions::clearStaticCache(), which resets static cached
values back to their pre-hook values.
* Add accessors for these private static variables to protect against
access before initialisation.
* Rename "inCache" to "cacheVaryingOptionsHash" for clarity.
* In ParserOptions::match(), filter static properties by detecting them
with ReflectionProperty, instead of making a big list of them.
* Update ParserOptionsTest for the fact that stubthreshold is no longer
a cache-varying option. This was hidden by
ParserOptionsTest::clearCache() injecting the wrong array into
ParserOptions.
Bug: T270228
Change-Id: I6b5ba022e1b889a10f9fbe93da63da9831504df8
For now, this complains about 7.4.0 – 7.4.8, and 7.3.0 - 7.3.18.
We will back-port this to the REL1_35 live release branch with
modifications as that requires 7.3.19+ already.
Bug: T246594
Bug: T270228
Change-Id: If5c7e3c1ba9dd9f6561c1de18130ded3aadc7149
Updated Doxygen markup in several .php files triggering warnings when mwdocgen.php is executed. Removed
obsolete settings MSCGEN_PATH and TCL_SUBST from Doxyfile. The former would generate a warning in 1.8.16
while TCL support was removed in 1.8.18. Since TCL_SUBST was blank anyway, it was removed prior to getting
to .18 in production. Increased DOT_GRAPH_MAX_NODES from 50 to 200 since Doxygen complained about it being
too low for API and Maintenance.
Bug: T248706
Change-Id: I9c67f0807d1b43089d351263d4f591dee5501f36
* Rename $longText to $cliText.
On the web we show a short intro and then a longer message after it.
On the CLI, a single value controls the full output, which used to
be $longText. This is now called $cliText to better reflect that it is
(only) used on the CLI, and to no longer imply that the short text is
also used there, because it isn't.
* Remove <p>-wrapping for $longHtml.
This is now moved to the callers instead. The long message exists for the
purpose of outputting multiple paragraphs and/or other elements (such as
lists or tables). Wrapping this in a <p> created a awkward situation
where the caller would have to close the implicit <p>, and then re-open
it at the end without closing as a way to output two paragraphs.
* Make $title be text instead of raw HTML.
This never made use of actual HTML, and it wasn't marked as such.
It should probably have been called $titleHtml for clarity.
To avoid having to think about this, treat it as text and escape it.
* Combine all web-facing parameters into one array, and declare their
keys in the same order as the output.
Previously, the order of was:
"$title, $shortText (, $longText), $longHtml"
Which suggested that the title is output first, followed by the short
and long messages. In actuality, the $shortText was output first, followed
by $title, and then the $longHtml. The $title parameter was not actually
an overall title. Rather, it was just the title for $longHtml.
The overall title is "Internal error" and not controlled by the caller.
New keys match the presentation order:
'intro', 'longTitle', and 'longHtml'.
* Remove unused "<div class=error>" element.
This had no styling of any kind. Renders identically without it.
Test Plan:
- For each of checkRequiredPHPVersion(), checkVendorExistence() and
checkExtensionExistence(), one at a time, change their main 'if' condition
to be 'if ( true )' and observe that the output renders correctly.
Change-Id: If4331a37c9b62c0061dcec0a1432de320f4c4103
Follows 15e0e9bb4, as Parsoid code which can trigger this is reliably
is now included in MediaWiki.
Bug: T228346
Change-Id: Ia0e9d2b84534e8a03880870e0f4434426b23f47a
This is just a first, top-level patch for documentation and the
PHPVersionCheck class itself. Much more clean-up to follow.
Bug: T192166
Change-Id: I50f5adc8d5fff604a14c8a889a31d3b92cc568c5
Phan can treat scalar types as non-interchangeable with
`scalar_implicit_cast` set to false. This patch fixes some of those
issues (which are in total >1000), namely the ones with alphabetic order
< includes/actions.
Change-Id: Ib1c6573ab899088bc319b9da9ceaffc850da3dbe
This was only used in two PHP files in all of core. It is not
needed (the block above the class keyword is naturally for that
class) and only emits a warning from Doxygen:
> PHPVersionCheck.php:35: warning: missing argument after \class.
> SpecialPageData.php:28: warning: missing argument after \class.
This is unlike JSDuck, where it is used to differentiate a function
from a constructor/class.
In Doxygen, `@class` is only used to create a virtual class within
the docs that isn't explicitly in an indexed file, and thus
requires a name.
Bug: T232104
Change-Id: Ie504a8e2b72be8f370dc0c90da6a03f64d93df2d
* Remove obsolete handling for 'load.php', which no longer
uses this check. This hasn't been used for several releases.
* Remove the 'entryPoint' parameter in favour of 'format',
which it was already a proxy for.
* Move the double dirname() logic to mw-config/index.php.
Bug: T189966
Change-Id: I343216442475d36e61213900f196ab6ec5f6b747
- Consistency of the acronym PHP instead of "php".
- Add documentation to $functionsExtensionsMapping.
Change-Id: I06b507128bc3b95605a764cd63f621dbae3b2dc3
In 7.2, the `utf8_encode` function was moved into core PHP, and is no
longer a part of the `xml` extension. Use a different function to check
for the existence of it.
Change-Id: Ib50c1a59dd9c2a8777b07b2f7a3dd638a55832c6
Because it doesn't work. `phpcs:ignoreFile` is intended as a performance
shortcut, and gives up on the file as soon as that token is found.
Instead, use `phpcs:disable` which does support selectively disabling
some sniffs. And since disabling is local to the file, there's no need
to re-enable it at the bottom of the file.
<https://github.com/squizlabs/PHP_CodeSniffer/issues/1903> has some
relevant discussion and clarification from upstream on this.
And make the files that are now being re-enabled pass PHPCS.
Change-Id: Ia4d8c45045f61cf9f24eb1d8631ff98d99c82d69
Clean up use of @codingStandardsIgnore
- @codingStandardsIgnoreFile -> phpcs:ignoreFile
- @codingStandardsIgnoreLine -> phpcs:ignore
- @codingStandardsIgnoreStart -> phpcs:disable
- @codingStandardsIgnoreEnd -> phpcs:enable
For phpcs:disable always the necessary sniffs are provided.
Some start/end pairs are changed to line ignore
Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8