Commit graph

51 commits

Author SHA1 Message Date
Reedy
bc6a8f58aa Set minimum PHP version to 7.2.9
Bug: T234766
Change-Id: I25206df6d7bc1587c3e18b1015603b3d264017f7
2019-10-10 20:31:54 +00:00
jenkins-bot
8838085574 Merge "PHP Version Check: Adjust wording on composer dependencies" 2019-10-07 15:29:10 +00:00
James D. Forrester
ed8e9397ad Drop HHVM support from MediaWiki
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
2019-10-02 14:32:01 -07:00
Kosta Harlan
5dcc017371 PHP Version Check: Adjust wording on composer dependencies
The usage of "now" implies that this is a recent change.

Change-Id: Ia18d088464b65580bb1631c4d6aaf5c23c5c89ce
2019-10-02 13:22:16 +02:00
James D. Forrester
23eaa5aa95 Prepare for REL1_34 cut, labelling master as 1.35-alpha
Change-Id: Iae024da81a3808a58e17af2278e104abbcd3dd1e
2019-09-30 10:19:58 -07:00
Fomafix
bb7d9f5296 PHPVersionCheck: Consistently use double quotes for HTML attributes
Change-Id: I6130d12b34ee4dc5e5896c7fa6a7bc14b1ed9893
2019-09-22 12:19:59 +02:00
Daimona Eaytoy
e5444ea55a docs: Avoid some scalar juggling
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
2019-09-19 17:21:24 +00:00
James D. Forrester
e88526b698 Bump PHP version requirement to 7.2.0+
Bug: T216165
Bug: T216166
Change-Id: I99e45c2a8fd1512a76a42ce978cb96f39ee2456e
2019-09-16 18:14:09 -07:00
Timo Tijhof
bf206185aa Remove spurious @class tags in two files
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
2019-09-09 19:04:28 +01:00
Max Semenik
a24194d704 PHPVersionCheck: remove version_compare() existence check
It was added to PHP in 2001.

Change-Id: I3b14d726aa1cefd6b64e4bac39ef489b3c79ac1a
2019-06-14 22:23:49 +00:00
Fomafix
9cbb8f104d Use https://www.php.net/ instead of https://secure.php.net/
Change-Id: I0acca592c6909e91b28b904da49dcbd6a43cd2a5
2019-04-12 06:44:48 +02:00
James D. Forrester
4310469dd8 Prepare for REL1_33 cut, labelling master as 1.34-alpha
Change-Id: I841ee1c898a6db2e4a10b5e8c68647d45f046dc7
2019-04-10 16:50:58 -07:00
Kunal Mehta
e604abd49a Fix PhanPluginDuplicateConditional* errors (#1)
Change-Id: I61e4d4a60dda27f43debab71a9c02f14c1468311
2019-03-23 18:06:35 -07:00
James D. Forrester
60a172aaea Update required PHP version to 7.0.13
Bug: T209423
Change-Id: I66e563adb062bc132a1092d78bfd06e2210f382e
2019-02-14 11:29:48 -08:00
Timo Tijhof
e6763161e7 PHPVersionCheck: Remove obsolete load.php code and simplify
* 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
2018-10-28 14:12:54 -07:00
Alangi Derick
edc5a90da1 Add docs and minor cleanup in PHPVersionCheck.php
- Consistency of the acronym PHP instead of "php".
- Add documentation to $functionsExtensionsMapping.

Change-Id: I06b507128bc3b95605a764cd63f621dbae3b2dc3
2018-10-18 18:56:16 +01:00
James D. Forrester
6e04121078 Prepare for REL1_32 cut, labelling master as 1.33-alpha
Change-Id: I41c19a63d20dc4e734430ad4fe989fa5a9e18d62
2018-10-15 14:58:59 -07:00
Alangi Derick
1c920468f6 Fix common typo "MediWiki" in MW core
Fixed typo "MediWiki" to "MediaWiki" in core.

Bug: T201491
Change-Id: I55cb4af63b72cfa08de079544c43ae9f1366a457
2018-08-14 21:07:43 +00:00
Umherirrender
9e7ca073ea Whitelist phpcs Squiz.Scope.MemberVarScope in PHPVersionCheck
The class supports php4 and the visibility private does not work there.

Change-Id: I9cbffe437a1d1f4243f0b70bd881cdc8b8257537
2018-08-07 12:39:46 +02:00
petarpetkovic
6da2a437e3 Insert space before compatibility link in PHP version message
Change-Id: Ia056ba7f9eddbcf31082c7b2f7a64e7dbf02cba4
2018-05-25 00:27:21 +02:00
James D. Forrester
9d875febd5 Bump PHP version requirement to 7.0.0+
Bug: T172165
Change-Id: I740f32ac859d9bb3787fdf8414f82ae6f410492f
2018-05-24 16:15:56 +01:00
jenkins-bot
981e98179a Merge "PHPVersionCheck: Properly check for xml extension in PHP 7.2+" 2018-04-25 01:01:40 +00:00
Kunal Mehta
9e5785b720 PHPVersionCheck: Properly check for xml extension in PHP 7.2+
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
2018-04-24 17:46:16 -07:00
James D. Forrester
8b1a3ddd97 Prepare for REL1_31 cut, labelling master as 1.32-alpha
Change-Id: Id0aaad5a06cb90c4b2b81fa233a0a622aaf91a1e
2018-04-17 21:04:58 +00:00
Reedy
f5a196a356 Display PHP version in old version error messages
Change-Id: I3a6135871de0fdc94fa3fe622c6534746035a209
2018-04-13 11:45:14 +00:00
Kunal Mehta
8a403cdb53 PHPVersionCheck: Remove bogus @return tags
Change-Id: Ic4bcf03bc84c2208186e47015a27fb93a63887d8
2018-04-08 17:11:36 -07:00
Kunal Mehta
24ae4318b3 Don't use phpcs:ignoreFile to selectively ignore sniffs
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
2018-04-08 17:08:53 -07:00
James D. Forrester
ce945fafa3 PHPVersionCheck: PHP 5.5.0 is no longer supported by upstream, but 5.6.0 is
Change-Id: I7031f0e909db8d63012f4057939292cb3b472cde
2018-01-18 15:51:33 -08:00
jenkins-bot
395b9c81ff Merge "Bump min supported HHVM version to 3.18.5" 2018-01-10 12:37:30 +00:00
Reedy
99c2be9f50 Bump min supported HHVM version to 3.18.5
Change-Id: I0a22c638bf6bbd6c8b93e50c23f8e455e36acd7c
2018-01-10 11:25:02 +00:00
Umherirrender
255d76f2a1 build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
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
2018-01-01 14:10:16 +01:00
James D. Forrester
9eb5775636 Prepare for 1.31 branch
Change-Id: I2a1ce7b7af7ef9991a054332593b1f63a0213469
2017-09-19 11:34:47 -07:00
Kunal Mehta
b663b8eb00 PHPVersionCheck: Use HTTPS download URL for downloading PHP
Change-Id: Iaf8e012b91888233703577e2de4ec522f39428e7
2017-08-21 22:45:04 -07:00
Umherirrender
5544cef16b Add missing type to @param documentation
Change-Id: I6b2c9c7af9a281fe457099cc3a336a60a25e74aa
2017-08-11 20:37:35 +02:00
Bartosz Dziewoński
b464034066 PHPVersionCheck: Add 'fileinfo' extension
We call mime_content_type() in a couple of important places with no
fallback.

Bug: T172643
Change-Id: I83db8b078f8f42d02fe6024ec9895da0688f1c91
2017-08-09 20:54:01 +02:00
Florian Schmidt
639e9ff3f2 Add HHVM version check
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
2017-05-19 09:59:13 +00:00
James D. Forrester
879344ea4a Prepare for 1.30 branch
Change-Id: If9842b19ec995d03f93f96bfad4d61ca96c37f3c
2017-04-26 11:48:55 -07:00
Bartosz Dziewoński
ecdef925bb Miscellaneous indentation tweaks
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
2017-02-27 19:23:54 +01:00
Florian Schmidt
f468fb867d Rebuilt PHPVersionCheck to be an own class
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
2016-11-03 17:11:36 +01:00
Chad Horohoe
b6c3fc93e9 Bump version number to 1.29.0-alpha for 1.29 development cycle
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
2016-10-25 16:17:48 -07:00
Chad Horohoe
41d1fa1c3a Move fatal PHP functions checks to initialization
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
2016-06-14 12:50:39 -07:00
Paladox
bd473b9642 Bump mediawiki version in PHPVersionCheck.php to 1.28
We bumped to version 1.28 in mediawiki recently but seems we forgot to do
it in PHPVersionCheck.php.

Change-Id: I2a455669b68225fd9d6772c8482559c220d433b5
2016-05-23 16:27:26 +00:00
Chad Horohoe
c3c37132a2 Bump required PHP version to 5.5.9
Result of RfC and extensive discussion. RfC approved
by Tim/ArchCom on 2016-01-27.

Bug: T75901
Depends-On: I00e2e7adf5202384fc92371b8d0551782c3c17cb
Change-Id: I68c5b5d60952418ff8300c163edfe2275571f41f
2016-02-10 06:46:53 +00:00
Reedy
333474077f Zend don't support less than PHP 5.5...
Change-Id: Iecc771cda2e67eeaf2b6bf27f338e698d3298e96
2016-01-12 23:34:20 +00:00
umherirrender
04bef3dd66 phpcs: Use __DIR__ constant instead of calling
Replaced all dirname(__FILE__) by __DIR__ or added
@codingStandardsIgnore

Found by tests:
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/2736/consoleFull

Change-Id: I90ff10f183ed60175fe580c43d73c0e57fd04234
2015-11-15 21:14:42 +01:00
Reedy
4418fa3aec Improve error message from when vendor files don't exist
Change-Id: Id1caeb487a4e801bd7f0f5377b6c06c6fc7eebe4
2015-10-31 22:57:07 +00:00
Amir E. Aharoni
c50cbe48ab Fix remaining Generic.Files.LineLength failures
Except the ones for which there is no clear way to fix
because of T114213.

Bug: T102614
Change-Id: I94a1fc7c890c82a36f0b51e42d311585c275775c
2015-10-03 17:23:07 +00:00
Amir E. Aharoni
c37d6549fd Fix Generic.Files.LineLength phpcs failure in 11 files under includes/
Bug: T102614
Change-Id: I0d759be6ef568c2c6f28606d3002484ad77a1830
2015-10-03 17:08:26 +00:00
James D. Forrester
865c784751 Begin 1.27 development cycle
Change-Id: Ib664051153e35d39f72e3d2e93516a16ba64b554
2015-09-26 13:41:27 +01:00
paladox
b3f9120af5 Rework PHP and vendor check
* separate warnings for PHP version and vendor

* new wfGenericError() function

* minimum PHP version in a single place

Bug: T102094
Change-Id: I7ae0369e4bab279d5e1bc754fe1a0bc8543bb2ed
2015-07-21 22:51:20 +02:00