Skip to content

Commit

Permalink
Support PHP 8.3 #116
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Dec 9, 2023
1 parent e4a142d commit b32ef58
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions admin/class-oik-trace-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) ) {
Expand Down
10 changes: 7 additions & 3 deletions tests/test-issue-79.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit b32ef58

Please # to comment.