Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
9 changes: 8 additions & 1 deletion tests/Unit/Capability/Discovery/DocBlockParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -78,7 +80,12 @@ public function testGetParamTagsReturnsStructuredParamInfo()

$this->assertInstanceOf(Param::class, $params['$param5']);
$this->assertEquals('param5', $params['$param5']->getVariableName());
$this->assertEquals('array<string,mixed>', $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<string, mixed>', $this->parser->getParamTypeString($params['$param5']));
} else {
$this->assertEquals('array<string,mixed>', $this->parser->getParamTypeString($params['$param5']));
}
$this->assertEquals('array description', $this->parser->getParamDescription($params['$param5']));

$this->assertInstanceOf(Param::class, $params['$param6']);
Expand Down
Loading