From 523bdfec5e8a2b9ef4b85f6bf0316104edd07ea1 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 18 Jan 2022 14:59:30 +0100 Subject: [PATCH] Require PHP 7.2+ --- .github/workflows/php.yml | 10 ++------ README.md | 2 +- doc/02-Installation.md | 6 ++--- modules/setup/library/Setup/WebWizard.php | 29 ++++++----------------- 4 files changed, 12 insertions(+), 35 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index a8d303edf..231b39da3 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -17,14 +17,8 @@ jobs: strategy: fail-fast: false matrix: - php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0'] + php: ['7.2', '7.3', '7.4', '8.0'] os: ['ubuntu-latest'] - include: - - php: '5.6' - allow_failure: true - phplint_options: "--exclude='{(?>.*/)?test/php/.*}' --exclude=library/Icinga/Test/BaseTestCase.php" - - php: '7.0' - allow_failure: true steps: - name: Checkout code base @@ -61,7 +55,7 @@ jobs: os: ['ubuntu-latest'] include: - php: '7.2' - phpunit-version: 8.5.15 + phpunit-version: 8.5 services: mysql: diff --git a/README.md b/README.md index 3949a99a8..bc1fc77c0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Icinga Web 2 -[![PHP Support](https://img.shields.io/badge/php-%3E%3D%205.6-777BB4?logo=PHP)](https://php.net/) +[![PHP Support](https://img.shields.io/badge/php-%3E%3D%207.2-777BB4?logo=PHP)](https://php.net/) ![Build Status](https://github.com/icinga/icingaweb2/workflows/PHP%20Tests/badge.svg?branch=master) [![Github Tag](https://img.shields.io/github/tag/Icinga/icingaweb2.svg)](https://github.com/Icinga/icingaweb2) diff --git a/doc/02-Installation.md b/doc/02-Installation.md index d0301b723..6c80d1672 100644 --- a/doc/02-Installation.md +++ b/doc/02-Installation.md @@ -38,8 +38,7 @@ thoroughly. * [Icinga 2](https://icinga.com/products/icinga-2/) with the IDO database backend (MySQL or PostgreSQL) * A web server, e.g. Apache or Nginx -* PHP version >= 7.3 - * Older versions (5.6+) are only supported up until Icinga Web v2.11 +* PHP version >= 7.2 ### Optional Requirements * For exports to PDF also the following PHP modules are required: mbstring, GD, Imagick @@ -388,8 +387,7 @@ You will need to install certain dependencies depending on your setup: * [Icinga 2](https://icinga.com/products/icinga-2/) with the IDO database backend (MySQL or PostgreSQL) * A web server, e.g. Apache or Nginx -* PHP version >= 7.3 - * Older versions (5.6+) are only supported up until version 2.11 +* PHP version >= 7.2 * [Icinga PHP Library (ipl)](https://github.com/Icinga/icinga-php-library) (>= 0.8) * [Icinga PHP Thirdparty](https://github.com/Icinga/icinga-php-thirdparty) (>= 0.10) * The following PHP modules must be installed: cURL, json, gettext, fileinfo, intl, dom, OpenSSL and xml diff --git a/modules/setup/library/Setup/WebWizard.php b/modules/setup/library/Setup/WebWizard.php index 2b6321d4a..0b49381ed 100644 --- a/modules/setup/library/Setup/WebWizard.php +++ b/modules/setup/library/Setup/WebWizard.php @@ -566,29 +566,14 @@ class WebWizard extends Wizard implements SetupWizard public function getRequirements($skipModules = false) { $set = new RequirementSet(); - $phpVersion = Platform::getPhpVersion(); - if (version_compare($phpVersion, '5.6', '>=') - && version_compare($phpVersion, '7.3', '<') - ) { - $set->add(new PhpVersionRequirement(array( - 'optional' => true, - 'condition' => array('>=', '7.3'), - 'description' => mt( - 'setup', - '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 PhpVersionRequirement(array( + 'condition' => array('>=', '7.2'), + 'description' => sprintf(mt( + 'setup', + 'Running Icinga Web 2 requires PHP version %s.' + ), '7.2') + ))); $set->add(new OSRequirement(array( 'optional' => true,