From fbc18149ea33bfd32728b883edbc5f88a6b7ec53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 16:13:58 +0000 Subject: [PATCH] chore(deps): update phpdocumentor/reflection-docblock requirement || ^6.0 Updates the requirements on [phpdocumentor/reflection-docblock](https://github.com/phpDocumentor/ReflectionDocBlock) to permit the latest version. - [Release notes](https://github.com/phpDocumentor/ReflectionDocBlock/releases) - [Commits](https://github.com/phpDocumentor/ReflectionDocBlock/compare/5.6.0...6.0.2) --- updated-dependencies: - dependency-name: phpdocumentor/reflection-docblock dependency-version: 6.0.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- composer.json | 3 ++- tests/Unit/Capability/Discovery/DocBlockParserTest.php | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 992f8d03..0444703f 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "ext-fileinfo": "*", "opis/json-schema": "^2.4", "php-http/discovery": "^1.20", - "phpdocumentor/reflection-docblock": "^5.6", + "phpdocumentor/reflection-docblock": "^5.6 || ^6.0", "psr/clock": "^1.0", "psr/container": "^1.0 || ^2.0", "psr/event-dispatcher": "^1.0", @@ -37,6 +37,7 @@ }, "require-dev": { "ext-openssl": "*", + "composer/semver": "^3.0", "firebase/php-jwt": "^6.10 || ^7.0", "laminas/laminas-httphandlerrunner": "^2.12", "nyholm/psr7": "^1.8", diff --git a/tests/Unit/Capability/Discovery/DocBlockParserTest.php b/tests/Unit/Capability/Discovery/DocBlockParserTest.php index ce924b57..a99a9caf 100644 --- a/tests/Unit/Capability/Discovery/DocBlockParserTest.php +++ b/tests/Unit/Capability/Discovery/DocBlockParserTest.php @@ -11,6 +11,8 @@ namespace Mcp\Tests\Unit\Capability\Discovery; +use Composer\InstalledVersions; +use Composer\Semver\VersionParser; use Mcp\Capability\Discovery\DocBlockParser; use phpDocumentor\Reflection\DocBlock; use phpDocumentor\Reflection\DocBlock\Tags\Deprecated; @@ -78,7 +80,12 @@ public function testGetParamTagsReturnsStructuredParamInfo() $this->assertInstanceOf(Param::class, $params['$param5']); $this->assertEquals('param5', $params['$param5']->getVariableName()); - $this->assertEquals('array', $this->parser->getParamTypeString($params['$param5'])); + // Remove if when dropping support for phpdocumentor/reflection-docblock:^5.6 + if (InstalledVersions::satisfies(new VersionParser(), 'phpdocumentor/reflection-docblock', '^6.0')) { + $this->assertEquals('array', $this->parser->getParamTypeString($params['$param5'])); + } else { + $this->assertEquals('array', $this->parser->getParamTypeString($params['$param5'])); + } $this->assertEquals('array description', $this->parser->getParamDescription($params['$param5'])); $this->assertInstanceOf(Param::class, $params['$param6']);