Skip to content
Draft
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
6 changes: 0 additions & 6 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ jobs:
dependencies: ['lowest', 'highest']
symfony-version: ['']
include:
- symfony-version: '5.4.*'
dependencies: 'highest'
php: '8.2'
- symfony-version: '6.4.*'
dependencies: 'highest'
php: '8.2'
- symfony-version: '7.4.*'
dependencies: 'highest'
php: '8.4'
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to `mcp/sdk` will be documented in this file.

0.11.0
------

### Server

* Discovery
* [BC Break] Generate tool input and output schemas with `symfony/json-schema`. Unions are described with `anyOf`, `null` comes last in `type`, `default: null` is no longer emitted, array shapes are closed with `additionalProperties: false`, string-keyed maps get `additionalProperties`, and a class parameter is described by its properties.
* [BC Break] `SchemaGenerator` takes a `Symfony\Component\JsonSchema\SchemaGeneratorInterface`, a `TypeResolverInterface` and the input and output `Configuration` instead of a `DocBlockParser`.
* [BC Break] Describe `array<int, V>` and `array<array-key, V>` as a JSON array, so a JSON object is rejected. Use `array<string, V>` for a map.
* [BC Break] Remove `DocBlockParser::getParamTypeString()` and `DocBlockParser::getParamDescription()`.
* Add the `outputSchemaFromReturnType` argument of `SchemaGenerator`, to describe the output of a tool that returns an object by its class.

0.10.0
------

Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"opis/json-schema": "^2.4",
"php-http/discovery": "^1.20",
"phpdocumentor/reflection-docblock": "^6.0",
"phpstan/phpdoc-parser": "^2.0",
"psr/clock": "^1.0",
"psr/container": "^1.1 || ^2.0",
"psr/event-dispatcher": "^1.0",
Expand All @@ -32,6 +33,8 @@
"psr/http-server-middleware": "^1.0",
"psr/log": "^1.0 || ^2.0 || ^3.0",
"symfony/deprecation-contracts": "^2.5 || ^3.0",
"symfony/json-schema": "^8.2@beta",
"symfony/type-info": "^7.4.6 || ^8.0.6",
"symfony/uid": "^5.4 || ^6.4 || ^7.3 || ^8.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

property-info ^7.4 makes 5.4/6.4 installs impossible now, can we bump the remaining ^5.4 || ^6.4 ranges (here, finder, http-client, lock, process...) to match what CI tests, and SYMFONY_REQUIRE still defaults to '>=6.4' in the pipeline?

},
"require-dev": {
Expand Down Expand Up @@ -60,7 +63,8 @@
"symfony/finder": "^5.4 || ^6.4 || ^7.3 || ^8.0",
"symfony/http-client": "^5.4 || ^6.4 || ^7.3 || ^8.0",
"symfony/lock": "^5.4 || ^6.4 || ^7.3 || ^8.0",
"symfony/process": "^5.4 || ^6.4 || ^7.3 || ^8.0"
"symfony/process": "^5.4 || ^6.4 || ^7.3 || ^8.0",
"symfony/validator": "^7.4 || ^8.0"
},
"conflict": {
"phpstan/phpstan": "2.3.0"
Expand Down
6 changes: 0 additions & 6 deletions phpstan.dist.neon
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,3 @@ parameters:
-
identifier: missingType.iterableValue
path: tests/

# These errors should actually be fixed, but are ignored for now
-
identifier: missingType.iterableValue
path: src/Server/Capability/Discovery/SchemaGenerator.php
count: 12
2 changes: 1 addition & 1 deletion src/Server/Capability/Discovery/Discoverer.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct(
}

$this->docBlockParser = $docBlockParser ?? new DocBlockParser(logger: $this->logger);
$this->schemaGenerator = $schemaGenerator ?? new SchemaGenerator($this->docBlockParser);
$this->schemaGenerator = $schemaGenerator ?? new SchemaGenerator();
}

/**
Expand Down
23 changes: 0 additions & 23 deletions src/Server/Capability/Discovery/DocBlockParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,4 @@ public function getParamTags(?DocBlock $docBlock): array

return $paramTags;
}

/**
* Gets the description string from a Param tag.
*/
public function getParamDescription(?Param $paramTag): ?string
{
return $paramTag ? (trim((string) $paramTag->getDescription()) ?: null) : null;
}

/**
* Gets the type string from a Param tag.
*/
public function getParamTypeString(?Param $paramTag): ?string
{
if ($paramTag && $paramTag->getType()) {
$typeFromTag = trim((string) $paramTag->getType());
if (!empty($typeFromTag)) {
return ltrim($typeFromTag, '\\');
}
}

return null;
}
}
Loading
Loading