[Server] Reorganize server handlers and transport structure for better organization (#86)

* refactor: reorganize server handlers and transport structure

* feat: move the test files to corresponding directories

* fix: linter issues

* fix: correct PHPDoc formatting and streamline handler imports

* refactor: update import statement for ServerBuilder to Builder
This commit is contained in:
Kyrian Obikwelu 2025-09-28 23:58:04 +01:00 • committed by GitHub
commit 41486bfaa4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,10 +11,10 @@
namespace Mcp\Tests\Unit\JsonRpc;
use Mcp\JsonRpc\Handler;
use Mcp\JsonRpc\MessageFactory;
use Mcp\Schema\JsonRpc\Response;
use Mcp\Server\MethodHandlerInterface;
use Mcp\Server\Handler\JsonRpcHandler;
use Mcp\Server\Handler\MethodHandlerInterface;
use Mcp\Server\Session\SessionFactoryInterface;
use Mcp\Server\Session\SessionInterface;
use Mcp\Server\Session\SessionStoreInterface;
@ -56,7 +56,7 @@ class HandlerTest extends TestCase
$sessionFactory->method('createWithId')->willReturn($session);
$sessionStore->method('exists')->willReturn(true);
$jsonRpc = new Handler(
$jsonRpc = new JsonRpcHandler(
MessageFactory::make(),
$sessionFactory,
$sessionStore,
@ -102,7 +102,7 @@ class HandlerTest extends TestCase
$sessionFactory->method('createWithId')->willReturn($session);
$sessionStore->method('exists')->willReturn(true);
$jsonRpc = new Handler(
$jsonRpc = new JsonRpcHandler(
MessageFactory::make(),
$sessionFactory,
$sessionStore,