From c12b608de731ee0b888cf4fc64d7e532861d16a7 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Mon, 20 Nov 2023 10:27:22 +0100 Subject: [PATCH 1/2] workflows: Add PHP 8.3 --- .github/workflows/php.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index b08065cc..e6d75f5c 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] os: ['ubuntu-latest'] steps: @@ -60,7 +60,7 @@ jobs: strategy: fail-fast: false matrix: - php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] + php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ] os: ['ubuntu-latest'] steps: From 89181377f4274a7f1f572e46787a5d1bec569558 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Mon, 20 Nov 2023 11:08:50 +0100 Subject: [PATCH 2/2] Fix PHP 8.2 & 8.3 phpstan errors --- application/controllers/UsageController.php | 1 + phpstan-baseline-common.neon | 36 ++------------------- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/application/controllers/UsageController.php b/application/controllers/UsageController.php index 35eb1aa0..079d24a6 100644 --- a/application/controllers/UsageController.php +++ b/application/controllers/UsageController.php @@ -95,6 +95,7 @@ public function indexAction() $this->addControl($searchBar); $this->handleFormatRequest($targets, function (Query $targets) { + /** @var X509Certificate $usage */ foreach ($targets as $usage) { $usage->valid_from = $usage->valid_from->format('l F jS, Y H:i:s e'); $usage->valid_to = $usage->valid_to->format('l F jS, Y H:i:s e'); diff --git a/phpstan-baseline-common.neon b/phpstan-baseline-common.neon index 1bc2792d..651eb564 100644 --- a/phpstan-baseline-common.neon +++ b/phpstan-baseline-common.neon @@ -241,23 +241,8 @@ parameters: path: application/controllers/SniController.php - - message: "#^Cannot access property \\$chain on mixed\\.$#" - count: 4 - path: application/controllers/UsageController.php - - - - message: "#^Cannot access property \\$hostname on mixed\\.$#" - count: 1 - path: application/controllers/UsageController.php - - - - message: "#^Cannot access property \\$ip on mixed\\.$#" - count: 1 - path: application/controllers/UsageController.php - - - - message: "#^Cannot access property \\$port on mixed\\.$#" - count: 1 + message: "#^Cannot access property \\$target on mixed\\.$#" + count: 3 path: application/controllers/UsageController.php - @@ -266,20 +251,10 @@ parameters: path: application/controllers/UsageController.php - - message: "#^Cannot access property \\$valid_from on mixed\\.$#" - count: 2 - path: application/controllers/UsageController.php - - - - message: "#^Cannot access property \\$valid_to on mixed\\.$#" + message: "#^Cannot call method format\\(\\) on mixed\\.$#" count: 2 path: application/controllers/UsageController.php - - - message: "#^Cannot call method getExportableColumns\\(\\) on mixed\\.$#" - count: 1 - path: application/controllers/UsageController.php - - message: "#^Method Icinga\\\\Module\\\\X509\\\\Controllers\\\\UsageController\\:\\:completeAction\\(\\) has no return type specified\\.$#" count: 1 @@ -295,11 +270,6 @@ parameters: count: 1 path: application/controllers/UsageController.php - - - message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects Traversable, mixed given\\.$#" - count: 1 - path: application/controllers/UsageController.php - - message: "#^Parameter \\#1 \\$peekAhead of method ipl\\\\Orm\\\\Query\\:\\:peekAhead\\(\\) expects bool, null given\\.$#" count: 1