Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions phppsinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ class PhpPsInfo
],
];

protected $incompatibility = [
'versions' => [
'php' => '8.2',
]
];

/**
* Set up login and password with parameter or
* you can set server env vars:
Expand Down Expand Up @@ -177,9 +183,11 @@ public function getVersions()
$this->requirements['versions']['php'],
$this->recommended['versions']['php'],
PHP_VERSION,
version_compare(PHP_VERSION, $this->recommended['versions']['php'], '>=') ?
self::TYPE_OK : (
version_compare(PHP_VERSION, $this->requirements['versions']['php'], '>=') ?
version_compare(PHP_VERSION, $this->recommended['versions']['php'], '>=') &&
version_compare(PHP_VERSION, $this->incompatibility['versions']['php'], '<') ?
self::TYPE_OK : (
version_compare(PHP_VERSION, $this->requirements['versions']['php'], '>=') &&
version_compare(PHP_VERSION, $this->incompatibility['versions']['php'], '<') ?
self::TYPE_WARNING :
self::TYPE_ERROR
)
Expand Down