Raise minimum required PHP version to 7.3

This commit is contained in:
Johannes Meyer 2021-06-22 11:59:04 +02:00
parent 6a0da10473
commit c5cb9dc34e
3 changed files with 31 additions and 8 deletions

View File

@ -14,7 +14,8 @@ chapter.
* [Icinga 2](https://icinga.com/products/icinga-2/) with the IDO database backend (MySQL or PostgreSQL) * [Icinga 2](https://icinga.com/products/icinga-2/) with the IDO database backend (MySQL or PostgreSQL)
* A web server, e.g. Apache or Nginx * A web server, e.g. Apache or Nginx
* PHP version >= 5.6.0 * PHP version >= 7.3
* Older versions (5.6+) are only supported up until version 2.11
* [Icinga PHP Library (ipl)](https://github.com/Icinga/icinga-php-library) (>= 0.6) * [Icinga PHP Library (ipl)](https://github.com/Icinga/icinga-php-library) (>= 0.6)
* [Icinga PHP Thirdparty](https://github.com/Icinga/icinga-php-thirdparty) (>= 0.10) * [Icinga PHP Thirdparty](https://github.com/Icinga/icinga-php-thirdparty) (>= 0.10)
* The following PHP modules must be installed: cURL, gettext, intl, mbstring, OpenSSL and xml * The following PHP modules must be installed: cURL, gettext, intl, mbstring, OpenSSL and xml

View File

@ -3,6 +3,12 @@
Specific version upgrades are described below. Please note that upgrades are incremental. An upgrade from Specific version upgrades are described below. Please note that upgrades are incremental. An upgrade from
v2.6 to v2.8 requires to follow the instructions for v2.7 too. v2.6 to v2.8 requires to follow the instructions for v2.7 too.
## Upgrading to Icinga Web 2 2.9.x
**Deprecations**
* Support for EOL PHP versions (5.6, 7.0, 7.1 and 7.2) will be removed with version 2.11
## Upgrading to Icinga Web 2 2.8.x ## Upgrading to Icinga Web 2 2.8.x
**Changes in packaging and dependencies** **Changes in packaging and dependencies**

View File

@ -3,6 +3,7 @@
namespace Icinga\Module\Setup; namespace Icinga\Module\Setup;
use Icinga\Application\Platform;
use Icinga\Module\Setup\Requirement\SetRequirement; use Icinga\Module\Setup\Requirement\SetRequirement;
use Icinga\Module\Setup\Requirement\WebLibraryRequirement; use Icinga\Module\Setup\Requirement\WebLibraryRequirement;
use PDOException; use PDOException;
@ -564,14 +565,29 @@ class WebWizard extends Wizard implements SetupWizard
public function getRequirements($skipModules = false) public function getRequirements($skipModules = false)
{ {
$set = new RequirementSet(); $set = new RequirementSet();
$phpVersion = Platform::getPhpVersion();
if (version_compare($phpVersion, '5.6', '>=')
&& version_compare($phpVersion, '7.3', '<')
) {
$set->add(new PhpVersionRequirement(array( $set->add(new PhpVersionRequirement(array(
'condition' => array('>=', '5.6'), 'optional' => true,
'condition' => array('>=', '7.3'),
'description' => mt( 'description' => mt(
'setup', 'setup',
'Running Icinga Web 2 requires PHP version 5.6.' 'Running Icinga Web 2 requires PHP version 7.3.'
. ' Older versions are only supported up until version 2.11.'
) )
))); )));
} else {
$set->add(new PhpVersionRequirement(array(
'condition' => array('>=', '7.3'),
'description' => mt(
'setup',
'Running Icinga Web 2 requires PHP version 7.3.'
)
)));
}
$set->add(new OSRequirement(array( $set->add(new OSRequirement(array(
'optional' => true, 'optional' => true,