From 9cd3a32603de4ef7b33374d543c0645ccebd76f9 Mon Sep 17 00:00:00 2001 From: Danny van der Sluijs Date: Fri, 18 Apr 2025 11:00:37 +0200 Subject: [PATCH 1/2] Fix workflow badge, tweak stable and unstable badges --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a0fe02ba..df426a0a 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -![Qa workflow](https://github.com/phpDocumentor/ReflectionDocBlock/workflows/Qa%20workflow/badge.svg) +[![Integrate](https://github.com/phpDocumentor/ReflectionDocBlock/actions/workflows/integrate.yaml/badge.svg)](https://github.com/phpDocumentor/ReflectionDocBlock/actions/workflows/integrate.yaml) [![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/phpDocumentor/ReflectionDocBlock.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/?branch=master) [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/phpDocumentor/ReflectionDocBlock.svg)](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionDocBlock/?branch=master) -[![Stable Version](https://img.shields.io/packagist/v/phpdocumentor/reflection-docblock.svg)](https://packagist.org/packages/phpdocumentor/reflection-docblock) -[![Unstable Version](https://img.shields.io/packagist/vpre/phpdocumentor/reflection-docblock.svg)](https://packagist.org/packages/phpdocumentor/reflection-docblock) +[![Stable Version](https://img.shields.io/packagist/v/phpdocumentor/reflection-docblock.svg?label=stable)](https://packagist.org/packages/phpdocumentor/reflection-docblock) +[![Unstable Version](https://img.shields.io/packagist/v/phpdocumentor/reflection-docblock.svg?include_prereleases&label=unstable)](https://packagist.org/packages/phpdocumentor/reflection-docblock) ReflectionDocBlock ================== From a508a8b1def68a8d694b41d6687cc7e1d0aa9dd9 Mon Sep 17 00:00:00 2001 From: Worma Date: Fri, 1 Aug 2025 06:16:17 +0200 Subject: [PATCH 2/2] setAccessible() does not have any effect as of PHP 8.1 --- src/DocBlock/Tags/InvalidTag.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/DocBlock/Tags/InvalidTag.php b/src/DocBlock/Tags/InvalidTag.php index 05944ab9..d84cf936 100644 --- a/src/DocBlock/Tags/InvalidTag.php +++ b/src/DocBlock/Tags/InvalidTag.php @@ -77,7 +77,9 @@ public function withError(Throwable $exception): self private function flattenExceptionBacktrace(Throwable $exception): void { $traceProperty = (new ReflectionClass(Exception::class))->getProperty('trace'); - $traceProperty->setAccessible(true); + if (PHP_VERSION_ID < 80100) { + $traceProperty->setAccessible(true); + } do { $trace = $exception->getTrace(); @@ -96,7 +98,9 @@ function (array $call): array { $exception = $exception->getPrevious(); } while ($exception !== null); - $traceProperty->setAccessible(false); + if (PHP_VERSION_ID < 80100) { + $traceProperty->setAccessible(false); + } } /**