Require PHP 7.2+

This commit is contained in:
Johannes Meyer 2022-01-18 14:59:30 +01:00
parent f72837676c
commit 523bdfec5e
4 changed files with 12 additions and 35 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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

View File

@ -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,