From b32ef58e9b4f78b83b71f09ef78e0522247a8269 Mon Sep 17 00:00:00 2001 From: Herb Miller Date: Sat, 9 Dec 2023 17:08:33 +0000 Subject: [PATCH] Support PHP 8.3 #116 --- admin/class-oik-trace-info.php | 1 + tests/test-issue-79.php | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/admin/class-oik-trace-info.php b/admin/class-oik-trace-info.php index 5f4a2d7..9fe31cd 100644 --- a/admin/class-oik-trace-info.php +++ b/admin/class-oik-trace-info.php @@ -229,6 +229,7 @@ function php_end_of_life() { , '8.0' => '2023-11-26' , '8.1' => '2024-11-25' , '8.2' => '2025-12-08' + , '8.3' => '2026-11-23' ); $eol = $php_eol[ PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION ]; if ( $eol < date( "Y-m-d" ) ) { diff --git a/tests/test-issue-79.php b/tests/test-issue-79.php index 9f50b23..1370875 100644 --- a/tests/test-issue-79.php +++ b/tests/test-issue-79.php @@ -14,20 +14,24 @@ function setUp() : void { } /** - * Need to check that PHP end-of-life is returned for PHP 7.3 + * * */ function test_php_end_of_life() { $phpversion = explode( '.', phpversion() ); switch ( $phpversion[1] ) { case '3': - $expected = 'End of life for your version of PHP is: 2021-12-06'; + if ( '8' === $phpversion[0]) { + $expected = 'End of life for your version of PHP is: 2026-11-23'; + } else { + $expected='End of life for your version of PHP was: 2021-12-06'; + } break; case '4': $expected = 'End of life for your version of PHP is: 2022-11-28'; break; case '0': - $expected = 'End of life for your version of PHP is: 2023-11-26'; + $expected = 'End of life for your version of PHP was: 2023-11-26'; break; case '1': $expected = 'End of life for your version of PHP is: 2024-11-25';