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 ================== 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); + } } /**