* 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
HHVM brings it's own version number, so relying on the PHP version
string in the PHP_VERSION const on an hhvm server maybe does not
increase in different versions of hhvm. Therefore, this change
implements a hhvm server version check, if MediaWiki runs on an
hhvm server, instead of checking the php version.
Bug: T123436
Change-Id: I91b0a4e1eded61d3ba63ecbd14cdc85c57295892
I was bored. What? Don't look at me that way.
I mostly targetted mixed tabs and spaces, but others were not spared.
Note that some of the whitespace changes are inside HTML output,
extended regexps or SQL snippets.
Change-Id: Ie206cc946459f6befcfc2d520e35ad3ea3c0f1e0
The class keyword should work in all reasonable working php installations,
as far as I know. In this way, the php version check does not rely on a
set of global functions. It also should make maintaining the different
checks a bit easier.
Change-Id: I73ee098a8cf931ca4df6263c6e0a3e215555b612
Branch point was dc0f9b3a3a
The following commits missed the branch point and should probably
be backported because master reports them as 1.28
- 4290f686c0
- 81698d4c16
- 40da8bf039
- 95db9833dd
- 7bd97758f7
Change-Id: I51562ba357b5533500ef9dd1e29107dd05cc9e1e
The installer is far too late of a place to be checking if
a function does or doesn't exist if we require it for operation.
Functions can very easily (T137509) be called prior to ever
getting to the installer check page.
Also, an old installation could've gotten past the checks if
they ran update.php --skip-compat-checks. What a scary setting!
Instead, fail hard, fast and early along with PHP version checks.
All entry points are required to go through this.
While we're here, also remove the check for mbstring.func_overload
since we already would've failed at WebStart.php
Change-Id: Ib9727979af2a4741f3cd952d13a3bb350fad43e4
We bumped to version 1.28 in mediawiki recently but seems we forgot to do
it in PHPVersionCheck.php.
Change-Id: I2a455669b68225fd9d6772c8482559c220d433b5
Result of RfC and extensive discussion. RfC approved
by Tim/ArchCom on 2016-01-27.
Bug: T75901
Depends-On: I00e2e7adf5202384fc92371b8d0551782c3c17cb
Change-Id: I68c5b5d60952418ff8300c163edfe2275571f41f
* separate warnings for PHP version and vendor
* new wfGenericError() function
* minimum PHP version in a single place
Bug: T102094
Change-Id: I7ae0369e4bab279d5e1bc754fe1a0bc8543bb2ed
This way, if someone tries to install MediaWiki via
either web installer or install.php maintenance script,
after obtaining from git, they get some useful information
on what to do.
Put the checks alongside the php version check, as
stuff installed via composer (mustache / lightncandy)
is used for NoLocalSettings.php and install.php
attempts to use logging stuff.
Also tried to make PHPVersionError look slightly nicer,
with some <h2> elements and more padding for the <p>
elements.
and centralized this code in one place, as much as possible,
for improved ease of maintenance.
Bug: T90438
Bug: T88951
Change-Id: Iae4eb42c4266dbe9213c5de8a96fccfbeaa9acb0