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
12 changes: 0 additions & 12 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,6 @@ parameters:
count: 1
path: src/Server/RequestHandler/ListToolsHandler.php

-
message: '#^Instantiated class Mcp\\Server\\ConfigurationException not found\.$#'
identifier: class.notFound
count: 4
path: src/Server/ServerBuilder.php

-
message: '#^Method Mcp\\Server\\ServerBuilder\:\:getCompletionProviders\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down Expand Up @@ -701,9 +695,3 @@ parameters:
identifier: property.onlyWritten
count: 1
path: src/Server/ServerBuilder.php

-
message: '#^Throwing object of an unknown class Mcp\\Server\\ConfigurationException\.$#'
identifier: class.notFound
count: 4
path: src/Server/ServerBuilder.php
19 changes: 19 additions & 0 deletions src/Exception/ConfigurationException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

/*
* This file is part of the official PHP MCP SDK.
*
* A collaboration between Symfony and the PHP Foundation.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Mcp\Exception;

/**
* @author Oskar Stark <oskarstark@googlemail.com>
*/
class ConfigurationException extends InvalidArgumentException
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure about which class to extend

{
}
1 change: 1 addition & 0 deletions src/Server/ServerBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Mcp\Capability\Registry;
use Mcp\Capability\Registry\Container;
use Mcp\Capability\Registry\ReferenceHandler;
use Mcp\Exception\ConfigurationException;
use Mcp\JsonRpc\Handler;
use Mcp\Schema\Annotations;
use Mcp\Schema\Implementation;
Expand Down