File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ All notable changes to `mcp/sdk` will be documented in this file.
66-----
77
88* Make ` Protocol ` stateless by decouple if from ` TransportInterface ` . Removed ` Protocol::getTransport() ` .
9+ * Change signature of ` Builder::addLoaders(...$loaders) ` to ` Builder::addLoaders(iterable $loaders) ` .
910
10110.1.0
1112-----
Original file line number Diff line number Diff line change @@ -434,11 +434,23 @@ public function addPrompt(
434434 }
435435
436436 /**
437- * @param LoaderInterface[] $loaders
437+ * Register a single custom loader.
438438 */
439- public function addLoaders (... $ loaders ): self
439+ public function addLoader ( LoaderInterface $ loader ): self
440440 {
441- $ this ->loaders = [...$ this ->loaders , ...$ loaders ];
441+ $ this ->loaders [] = $ loader ;
442+
443+ return $ this ;
444+ }
445+
446+ /**
447+ * @param iterable<LoaderInterface> $loaders
448+ */
449+ public function addLoaders (iterable $ loaders ): self
450+ {
451+ foreach ($ loaders as $ loader ) {
452+ $ this ->loaders = [$ loader ];
453+ }
442454
443455 return $ this ;
444456 }
You can’t perform that action at this time.
0 commit comments