aboutsummaryrefslogtreecommitdiffstats
path: root/includes/PHPVersionCheck.php
Commit message (Collapse)AuthorAgeFilesLines
* Restore PHP 4.0 compatibility to PHPVersionCheckPetr Pchelko2021-06-071-1/+1
| | | | Change-Id: Iede04d48730ce7dabe0a537a35752f59c1497e46
* Use null coalecing operators everywhere consistenctly.Petr Pchelko2021-06-031-1/+1
| | | | | | Auto-generated with rector. Change-Id: I4f27e10cf029bb067b7bc57d82f7a64e21ea8d42
* Prepare for REL1_36 cut, labelling master as 1.37-alphaJames D. Forrester2021-04-061-1/+1
| | | | | Bug: T279456 Change-Id: Iffb6d982e402d998343ffa00f23bb29fba1723b9
* Exclude includes/PHPVersionCheck.php from phan scanningReedy2021-03-291-2/+0
| | | | | Subset cherry pick of a patch from REL1_35 Change-Id: Ic179ae51e9508e4af8c1fe57b78daa6102534faa
* PHPVersionCheck: Graceful handling for missing php-intlAmmarpad2021-03-201-0/+1
| | | | | | | MediaWiki 1.36 requires php-intl, but missing it currently throws exception instead of graceful failure Change-Id: Id18c45ce4da85105e4c94164cf2c6a4c5536a540
* Make ParserOptionsTest work on PHP<7.4.9 with opcache enabledTim Starling2021-03-021-1/+0
| | | | | | | | | | | | | | | | | | | | 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
* PHPVersionCheck: Complain about known-bad versions above minimumJames D. Forrester2021-02-251-8/+48
| | | | | | | | | | | 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
* PHPVersionCheck: The PHP Group only support PHP >= 7.3.0Reedy2021-01-301-1/+1
| | | | | | | | | | | And 7.3 goes EOL (security support) 6 Dec 2021. 7.2.0 went EOL 30 Nov 2020. https://www.php.net/supported-versions.php https://www.php.net/eol.php Change-Id: I23f359dbba952e882acd40a0ec3c5e8340ae47b4
* Improve class property documentationUmherirrender2020-10-301-1/+1
| | | | | | Reformat existing documentation to match the format Change-Id: I190b54b5e962f17bab6502dd1b3c02f11dc926d2
* Fix broken PHPDoc comments that don't start with /**Thiemo Kreuz2020-07-231-2/+2
| | | | Change-Id: I8db56ff0f73873864dde260e51adcd729aa74e94
* Prepare for REL1_35 cut, labelling master as 1.36-alphaJames D. Forrester2020-07-141-1/+1
| | | | Change-Id: I91fc77a436468fa9a549383c1dac701cc5f5b6fe
* doxygen: Changed Doxygen tags causing warnings during documentation generationHolger Knust2020-04-141-1/+1
| | | | | | | | | | | 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
* PHPVersionCheck: Refactor triggerError() to be easier to understandTimo Tijhof2020-03-021-38/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* The PHP Group stopped supporting 7.1 in late 2019Reedy2020-03-021-1/+1
| | | | | | | As per https://www.php.net/eol.php 7.1 was EOL and therefore unsupported since 1 December 2019. Change-Id: I2f6e307457365f0adf1b727b4fff9ed19c685b4f
* Increase PHP requirement from 7.2.9 to 7.2.22 due to segfault issueJames D. Forrester2020-02-241-1/+1
| | | | | | | | Follows 15e0e9bb4, as Parsoid code which can trigger this is reliably is now included in MediaWiki. Bug: T228346 Change-Id: Ia0e9d2b84534e8a03880870e0f4434426b23f47a
* PHPVersionCheck: Simplify warning as part of dropping HHVM supportJames D. Forrester2019-10-101-47/+16
| | | | | Bug: T192166 Change-Id: Ia92b881a7eeab4b8b53531136fb0dbafb6ec30ba
* Set minimum PHP version to 7.2.9Reedy2019-10-101-1/+1
| | | | | Bug: T234766 Change-Id: I25206df6d7bc1587c3e18b1015603b3d264017f7
* Merge "PHP Version Check: Adjust wording on composer dependencies"jenkins-bot2019-10-071-2/+2
|\
| * PHP Version Check: Adjust wording on composer dependenciesKosta Harlan2019-10-021-2/+2
| | | | | | | | | | | | The usage of "now" implies that this is a recent change. Change-Id: Ia18d088464b65580bb1631c4d6aaf5c23c5c89ce
* | Drop HHVM support from MediaWikiJames D. Forrester2019-10-021-22/+5
| | | | | | | | | | | | | | | | 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
* | Prepare for REL1_34 cut, labelling master as 1.35-alphaJames D. Forrester2019-09-301-1/+1
|/ | | | Change-Id: Iae024da81a3808a58e17af2278e104abbcd3dd1e
* PHPVersionCheck: Consistently use double quotes for HTML attributesFomafix2019-09-221-4/+4
| | | | Change-Id: I6130d12b34ee4dc5e5896c7fa6a7bc14b1ed9893
* docs: Avoid some scalar jugglingDaimona Eaytoy2019-09-191-2/+2
| | | | | | | | | 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
* Bump PHP version requirement to 7.2.0+James D. Forrester2019-09-161-2/+2
| | | | | | Bug: T216165 Bug: T216166 Change-Id: I99e45c2a8fd1512a76a42ce978cb96f39ee2456e
* Remove spurious `@class` tags in two filesTimo Tijhof2019-09-091-2/+0
| | | | | | | | | | | | | | | | | | | 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
* PHPVersionCheck: remove version_compare() existence checkMax Semenik2019-06-141-4/+1
| | | | | | It was added to PHP in 2001. Change-Id: I3b14d726aa1cefd6b64e4bac39ef489b3c79ac1a
* Use https://www.php.net/ instead of https://secure.php.net/Fomafix2019-04-121-2/+2
| | | | Change-Id: I0acca592c6909e91b28b904da49dcbd6a43cd2a5
* Prepare for REL1_33 cut, labelling master as 1.34-alphaJames D. Forrester2019-04-101-1/+1
| | | | Change-Id: I841ee1c898a6db2e4a10b5e8c68647d45f046dc7
* Fix PhanPluginDuplicateConditional* errors (#1)Kunal Mehta2019-03-231-0/+1
| | | | Change-Id: I61e4d4a60dda27f43debab71a9c02f14c1468311
* Update required PHP version to 7.0.13James D. Forrester2019-02-141-1/+1
| | | | | Bug: T209423 Change-Id: I66e563adb062bc132a1092d78bfd06e2210f382e
* PHPVersionCheck: Remove obsolete load.php code and simplifyTimo Tijhof2018-10-281-44/+42
| | | | | | | | | | | | | * 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
* Add docs and minor cleanup in PHPVersionCheck.phpAlangi Derick2018-10-181-9/+11
| | | | | | | - Consistency of the acronym PHP instead of "php". - Add documentation to $functionsExtensionsMapping. Change-Id: I06b507128bc3b95605a764cd63f621dbae3b2dc3
* Prepare for REL1_32 cut, labelling master as 1.33-alphaJames D. Forrester2018-10-151-1/+1
| | | | Change-Id: I41c19a63d20dc4e734430ad4fe989fa5a9e18d62
* Fix common typo "MediWiki" in MW coreAlangi Derick2018-08-141-1/+1
| | | | | | | Fixed typo "MediWiki" to "MediaWiki" in core. Bug: T201491 Change-Id: I55cb4af63b72cfa08de079544c43ae9f1366a457
* Whitelist phpcs Squiz.Scope.MemberVarScope in PHPVersionCheckUmherirrender2018-08-071-0/+1
| | | | | | The class supports php4 and the visibility private does not work there. Change-Id: I9cbffe437a1d1f4243f0b70bd881cdc8b8257537
* Insert space before compatibility link in PHP version messagepetarpetkovic2018-05-251-1/+1
| | | | Change-Id: Ia056ba7f9eddbcf31082c7b2f7a64e7dbf02cba4
* Bump PHP version requirement to 7.0.0+James D. Forrester2018-05-241-2/+2
| | | | | Bug: T172165 Change-Id: I740f32ac859d9bb3787fdf8414f82ae6f410492f
* Merge "PHPVersionCheck: Properly check for `xml` extension in PHP 7.2+"jenkins-bot2018-04-251-1/+1
|\
| * PHPVersionCheck: Properly check for `xml` extension in PHP 7.2+Kunal Mehta2018-04-241-1/+1
| | | | | | | | | | | | | | | | 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
* | Prepare for REL1_31 cut, labelling master as 1.32-alphaJames D. Forrester2018-04-171-1/+1
|/ | | | Change-Id: Id0aaad5a06cb90c4b2b81fa233a0a622aaf91a1e
* Display PHP version in old version error messagesReedy2018-04-131-1/+2
| | | | Change-Id: I3a6135871de0fdc94fa3fe622c6534746035a209
* PHPVersionCheck: Remove bogus @return tagsKunal Mehta2018-04-081-7/+0
| | | | Change-Id: Ic4bcf03bc84c2208186e47015a27fb93a63887d8
* Don't use `phpcs:ignoreFile` to selectively ignore sniffsKunal Mehta2018-04-081-5/+5
| | | | | | | | | | | | | | | 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
* PHPVersionCheck: PHP 5.5.0 is no longer supported by upstream, but 5.6.0 isJames D. Forrester2018-01-181-3/+3
| | | | Change-Id: I7031f0e909db8d63012f4057939292cb3b472cde
* Merge "Bump min supported HHVM version to 3.18.5"jenkins-bot2018-01-101-2/+2
|\
| * Bump min supported HHVM version to 3.18.5Reedy2018-01-101-2/+2
| | | | | | | | Change-Id: I0a22c638bf6bbd6c8b93e50c23f8e455e36acd7c
* | build: Updating mediawiki/mediawiki-codesniffer to 15.0.0Umherirrender2018-01-011-3/+5
|/ | | | | | | | | | | | | 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
* Prepare for 1.31 branchJames D. Forrester2017-09-191-1/+1
| | | | Change-Id: I2a1ce7b7af7ef9991a054332593b1f63a0213469
* PHPVersionCheck: Use HTTPS download URL for downloading PHPKunal Mehta2017-08-211-1/+1
| | | | Change-Id: Iaf8e012b91888233703577e2de4ec522f39428e7
* Add missing type to @param documentationUmherirrender2017-08-111-3/+3
| | | | Change-Id: I6b2c9c7af9a281fe457099cc3a336a60a25e74aa