You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ All notable changes to `mcp/sdk` will be documented in this file.
6
6
-----
7
7
8
8
*[BC Break] Remove the `providerClass` argument of `#[CompletionProvider]`. Use `provider:`, which takes the same class-string and is now the first positional argument.
9
+
*[BC Break]`StreamableHttpTransport::handleFiberTermination()` takes the terminated `\Fiber` as its first argument; a subclass overriding it has to accept it too.
10
+
*[BC Break] Reject a `Tool` input schema whose `properties` is not an object or whose `required` is neither a list nor `null`, instead of silently replacing the member. Reject a `completion/complete` whose `argument` is missing `name` or `value`, instead of completing against an empty prefix.
9
11
* Add `HttpTransport::getSessionId()` to read the server-minted `Mcp-Session-Id`: a request-scoped caller can persist it and pass it back through the constructor's `$headers` on a later transport. Always `null` on `2026-07-28`, which removed protocol-level sessions.
@@ -431,17 +423,13 @@ private function getClassFromFile(SplFileInfo $file): ?string
431
423
}
432
424
433
425
foreach ($potentialClassesas$potentialClass) {
434
-
if (class_exists($potentialClass, true)) {
426
+
if (class_exists($potentialClass, true) || interface_exists($potentialClass, true) || trait_exists($potentialClass, true)) {
435
427
return$potentialClass;
436
428
}
437
429
}
438
430
439
431
if (!empty($potentialClasses)) {
440
-
if (!class_exists($potentialClasses[0], false)) {
441
-
$this->logger->debug('getClassFromFile returning potential non-class type. Are you sure this class has been autoloaded?', ['file' => $file->getPathname(), 'type' => $potentialClasses[0]]);
442
-
}
443
-
444
-
return$potentialClasses[0];
432
+
$this->logger->debug('getClassFromFile found no loadable type. Are you sure this class has been autoloaded?', ['file' => $file->getPathname(), 'type' => $potentialClasses[0]]);
@@ -536,7 +530,8 @@ private function parseParametersInfo(\ReflectionMethod|\ReflectionFunction $refl
536
530
537
531
$paramName = $rp->getName();
538
532
if (\in_array(strtolower($paramName), ['_session', '_request'], true)) {
539
-
thrownewInvalidArgumentException(\sprintf('Handler method "%s::%s" has parameter named "%s" which is not allowed. Please change the name of that parameter.', $reflection->class, $reflection->name, $paramName));
thrownewInvalidArgumentException(\sprintf('Handler "%s" has parameter named "%s" which is not allowed. Please change the name of that parameter.', $handlerName, $paramName));
540
535
}
541
536
$paramTag = $paramTags['$'.$paramName] ?? null;
542
537
@@ -693,8 +688,10 @@ private function getTypeStringFromReflection(?\ReflectionType $type, bool $nativ
693
688
// Remove leading backslash from class names, but handle built-ins like 'int' or unions like 'int|string'
0 commit comments