Add missing ConfigurationException and update PHPStan baseline (#31)
- Add ConfigurationException class in src/Exception/ConfigurationException.php - Update ServerBuilder to use the new ConfigurationException - Regenerate PHPStan baseline to account for the new exception class, reducing errors from 160+ to 124
This commit is contained in:
parent
7eaca45860
commit
a7ddc11844
3 changed files with 20 additions and 12 deletions
|
|
@ -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
|
||||
|
|
@ -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
src/Exception/ConfigurationException.php
Normal file
19
src/Exception/ConfigurationException.php
Normal file
|
|
@ -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
|
||||
{
|
||||
}
|
||||
|
|
@ -21,6 +21,7 @@ use Mcp\Capability\Prompt\Completion\ListCompletionProvider;
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue