Skip to content

Commit

Permalink
Correct EOL dates of PHP versions (matomo-org#22803)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl authored Nov 27, 2024
1 parent ea07d10 commit e499781
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions core/Plugin/ControllerAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,17 +418,20 @@ protected static function getPiwikVersion()

private static function isPhpVersionEOL()
{
$phpEOL = '7.3';
$phpEOL = '8.0';

// End of security update for certain PHP versions as of https://www.php.net/supported-versions.php
if (Date::today()->isLater(Date::factory('2022-11-28'))) {
$phpEOL = '7.4';
// End of security update for certain PHP versions as of https://www.php.net/supported-versions
if (Date::today()->isLater(Date::factory('2025-12-31'))) {
$phpEOL = '8.1';
}
if (Date::today()->isLater(Date::factory('2023-11-26'))) {
$phpEOL = '8.0';
if (Date::today()->isLater(Date::factory('2026-12-31'))) {
$phpEOL = '8.2';
}
if (Date::today()->isLater(Date::factory('2024-11-25'))) {
$phpEOL = '8.1';
if (Date::today()->isLater(Date::factory('2027-12-31'))) {
$phpEOL = '8.3';
}
if (Date::today()->isLater(Date::factory('2028-12-31'))) {
$phpEOL = '8.4';
}

return version_compare(PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION, $phpEOL, '<=');
Expand Down

0 comments on commit e499781

Please sign in to comment.