From 3e19c39536c7c4202467e87de4473dd69ee2c4c3 Mon Sep 17 00:00:00 2001 From: Bruce Wells Date: Thu, 23 Nov 2023 09:26:33 -0500 Subject: [PATCH] PHP 8.3 --- .github/workflows/tests.yml | 2 +- composer.json | 2 +- src/PHPFUI/InstaDoc/Section/CodeCommon.php | 3 +++ src/PHPFUI/InstaDoc/Tests/Status.php | 2 -- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 952e848..b413c90 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: true matrix: - php: [8.2, 8.1, 8.0] + php: [8.3, 8.2, 8.1, 8.0] dependency-version: [prefer-stable] os: [ubuntu-latest] diff --git a/composer.json b/composer.json index 776a6d1..6d61871 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": ">=8.0 <8.3", + "php": ">=8.0 <8.4", "phpfui/phpfui": "^6.0", "phpdocumentor/reflection-docblock": "^5.0", "gitonomy/gitlib": "^1.2", diff --git a/src/PHPFUI/InstaDoc/Section/CodeCommon.php b/src/PHPFUI/InstaDoc/Section/CodeCommon.php index 57d2757..5758b49 100644 --- a/src/PHPFUI/InstaDoc/Section/CodeCommon.php +++ b/src/PHPFUI/InstaDoc/Section/CodeCommon.php @@ -215,6 +215,7 @@ protected function formatComments(?\phpDocumentor\Reflection\DocBlock $docBlock, } $tags = $docBlock->getTags(); + // if we are in a method, inheritdoc makes sense, and we should get the correct doc block comments if ($reflection instanceof \ReflectionMethod) { @@ -230,6 +231,7 @@ protected function formatComments(?\phpDocumentor\Reflection\DocBlock $docBlock, $name = $tag->getName(); $description = \method_exists($tag, 'getDescription') ? \trim($tag->getDescription() ?? '') : ''; $body = ''; + // punt on useless tags if (\in_array($name, ['method', 'inheritdoc'])) { @@ -403,6 +405,7 @@ protected function getClassName(string | object $class, bool $asLink = true) : s $array = '[]'; $class = \str_replace($array, '', $class); } + // if fully qualified, we are done if (\PHPFUI\InstaDoc\NamespaceTree::hasClass($class)) { diff --git a/src/PHPFUI/InstaDoc/Tests/Status.php b/src/PHPFUI/InstaDoc/Tests/Status.php index b53804c..aad8813 100644 --- a/src/PHPFUI/InstaDoc/Tests/Status.php +++ b/src/PHPFUI/InstaDoc/Tests/Status.php @@ -12,8 +12,6 @@ enum Status { case Archived; - case Draft; - case Published; }