Skip to content

Commit

Permalink
Bump default PHP to 8.2 (#2113)
Browse files Browse the repository at this point in the history
As per the [support
schedule](https://www.php.net/supported-versions.php), PHP 8.1 is only
receiving security fixes and will become EOL as of December 8, 2024.
Given that many CDash systems go long periods of time between updates,
it makes sense to proactively increase the default PHP version in our
base images to PHP 8.2. Unfortunately, RedHat has not released a PHP 8.2
UBI image yet, so only the Debian image has been updated. The UBI image
will be updated to PHP 8.2 once an image becomes available.

Closes #2094.
  • Loading branch information
williamjallen authored Apr 3, 2024
1 parent f8eeec7 commit 833e98e
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG DEVELOPMENT_BUILD
###############################################################################
# The base image for regular Debian-based images
###############################################################################
FROM php:8.1-apache-bookworm AS cdash-debian-intermediate
FROM php:8.2-apache-bookworm AS cdash-debian-intermediate

ARG BASE_IMAGE
ARG DEVELOPMENT_BUILD
Expand Down
1 change: 1 addition & 0 deletions app/cdash/app/Model/BuildConfigure.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class BuildConfigure
public $BuildId;
public $NumberOfWarnings;
public $NumberOfErrors;
public $LabelCollection;
private $Crc32;

private $PDO;
Expand Down
2 changes: 1 addition & 1 deletion app/cdash/app/Model/BuildErrorFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class BuildErrorFilter
{
private $ErrorsFilter;
private $WarningsFilter;

public $Project;
private $PDO;

public function __construct(Project $project)
{
Expand Down
3 changes: 0 additions & 3 deletions app/cdash/tests/test_buildgetdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public function testBuildGetDate()
$build->StartTime = $evening_after;

$expected_date = '2009-02-24';
$build->NightlyStartTime = false;
$date = $build->GetDate();
if ($date !== $expected_date) {
$this->fail("Evening case: expected $expected_date, found $date");
Expand All @@ -56,15 +55,13 @@ public function testBuildGetDate()
$build->GetProject()->SetNightlyTime('09:00:00 America/New_York');
$build->StartTime = $morning_before;
$expected_date = '2009-02-22';
$build->NightlyStartTime = false;
$date = $build->GetDate();
if ($date !== $expected_date) {
$this->fail("Morning case: expected $expected_date, found $date");
}

$build->StartTime = $morning_after;
$expected_date = '2009-02-23';
$build->NightlyStartTime= false;
$date = $build->GetDate();
if ($date !== $expected_date) {
$this->fail("Morning case: expected $expected_date, found $date");
Expand Down
1 change: 1 addition & 0 deletions app/cdash/xml_handlers/done_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class DoneHandler extends AbstractHandler
private $FinalAttempt;
private $PendingSubmissions;
private $Requeue;
public $backupFileName;

public function __construct($projectID)
{
Expand Down
3 changes: 3 additions & 0 deletions app/cdash/xml_handlers/testing_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class TestingHandler extends AbstractHandler implements ActionableBuildInterface
private $TestMeasurement;
private $Label;

// TODO: Evaluate whether this is needed
private $Labels;

private $TestCreator;

/** @var Build[] Builds */
Expand Down
40 changes: 20 additions & 20 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6909,11 +6909,6 @@ parameters:
count: 1
path: app/cdash/app/Model/Build.php

-
message: "#^Access to an undefined property CDash\\\\Model\\\\BuildConfigure\\:\\:\\$LabelCollection\\.$#"
count: 5
path: app/cdash/app/Model/BuildConfigure.php

-
message: """
#^Call to deprecated function add_log\\(\\)\\:
Expand Down Expand Up @@ -7016,6 +7011,11 @@ parameters:
count: 1
path: app/cdash/app/Model/BuildConfigure.php

-
message: "#^Property CDash\\\\Model\\\\BuildConfigure\\:\\:\\$LabelCollection has no type specified\\.$#"
count: 1
path: app/cdash/app/Model/BuildConfigure.php

-
message: "#^Property CDash\\\\Model\\\\BuildConfigure\\:\\:\\$Log has no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -7288,11 +7288,6 @@ parameters:
count: 1
path: app/cdash/app/Model/BuildError.php

-
message: "#^Access to an undefined property CDash\\\\Model\\\\BuildErrorFilter\\:\\:\\$PDO\\.$#"
count: 8
path: app/cdash/app/Model/BuildErrorFilter.php

-
message: "#^Argument of an invalid type array\\<int, string\\>\\|false supplied for foreach, only iterables are supported\\.$#"
count: 1
Expand Down Expand Up @@ -7393,6 +7388,11 @@ parameters:
count: 1
path: app/cdash/app/Model/BuildErrorFilter.php

-
message: "#^Property CDash\\\\Model\\\\BuildErrorFilter\\:\\:\\$PDO has no type specified\\.$#"
count: 1
path: app/cdash/app/Model/BuildErrorFilter.php

-
message: "#^Property CDash\\\\Model\\\\BuildErrorFilter\\:\\:\\$Project has no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -21354,11 +21354,6 @@ parameters:
count: 1
path: app/cdash/tests/test_buildfailuredetails.php

-
message: "#^Access to an undefined property CDash\\\\Model\\\\Build\\:\\:\\$NightlyStartTime\\.$#"
count: 1
path: app/cdash/tests/test_buildgetdate.php

-
message: "#^Method BuildGetDateTestCase\\:\\:testBuildGetDate\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -28132,6 +28127,11 @@ parameters:
count: 1
path: app/cdash/xml_handlers/done_handler.php

-
message: "#^Property DoneHandler\\:\\:\\$backupFileName has no type specified\\.$#"
count: 1
path: app/cdash/xml_handlers/done_handler.php

-
message: "#^Access to an undefined property DynamicAnalysisHandler\\:\\:\\$BuildName\\.$#"
count: 5
Expand Down Expand Up @@ -28848,11 +28848,6 @@ parameters:
count: 1
path: app/cdash/xml_handlers/stack.php

-
message: "#^Access to an undefined property TestingHandler\\:\\:\\$Labels\\.$#"
count: 3
path: app/cdash/xml_handlers/testing_handler.php

-
message: "#^Call to an undefined method CDash\\\\Messaging\\\\Preferences\\\\NotificationPreferencesInterface\\:\\:get\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -28988,6 +28983,11 @@ parameters:
count: 1
path: app/cdash/xml_handlers/testing_handler.php

-
message: "#^Property TestingHandler\\:\\:\\$Labels has no type specified\\.$#"
count: 1
path: app/cdash/xml_handlers/testing_handler.php

-
message: "#^Property TestingHandler\\:\\:\\$NumberTestsFailed has no type specified\\.$#"
count: 1
Expand Down

0 comments on commit 833e98e

Please sign in to comment.