diff --git a/CHANGELOG.md b/CHANGELOG.md index b6667b03..31e3be7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to `mcp/sdk` will be documented in this file. +0.4.0 +----- + +* Rename `Mcp\Server\Session\Psr16StoreSession` to `Mcp\Server\Session\Psr16SessionStore` + 0.3.0 ----- diff --git a/README.md b/README.md index 52b3ebec..2a131265 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ By default, the SDK uses in-memory sessions. You can configure different session ```php use Mcp\Server\Session\FileSessionStore; use Mcp\Server\Session\InMemorySessionStore; -use Mcp\Server\Session\Psr16StoreSession; +use Mcp\Server\Session\Psr16SessionStore; use Symfony\Component\Cache\Psr16Cache; use Symfony\Component\Cache\Adapter\RedisAdapter; @@ -220,7 +220,7 @@ $redisAdapter = new RedisAdapter( ); $server = Server::builder() - ->setSession(new Psr16StoreSession( + ->setSession(new Psr16SessionStore( cache: new Psr16Cache($redisAdapter), prefix: 'mcp-', ttl: 3600 diff --git a/docs/server-builder.md b/docs/server-builder.md index 5b00f902..c149bf14 100644 --- a/docs/server-builder.md +++ b/docs/server-builder.md @@ -150,7 +150,7 @@ Configure session storage and lifecycle. By default, the SDK uses `InMemorySessi ```php use Mcp\Server\Session\FileSessionStore; use Mcp\Server\Session\InMemorySessionStore; -use Mcp\Server\Session\Psr16StoreSession; +use Mcp\Server\Session\Psr16SessionStore; use Symfony\Component\Cache\Psr16Cache; use Symfony\Component\Cache\Adapter\RedisAdapter; @@ -178,7 +178,7 @@ $redisAdapter = new RedisAdapter( ); $server = Server::builder() - ->setSession(new Psr16StoreSession( + ->setSession(new Psr16SessionStore( cache: new Psr16Cache($redisAdapter), prefix: 'mcp-', ttl: 3600 diff --git a/src/Server/Session/Psr16StoreSession.php b/src/Server/Session/Psr16SessionStore.php similarity index 96% rename from src/Server/Session/Psr16StoreSession.php rename to src/Server/Session/Psr16SessionStore.php index 2f403f1a..a4410db5 100644 --- a/src/Server/Session/Psr16StoreSession.php +++ b/src/Server/Session/Psr16SessionStore.php @@ -24,7 +24,7 @@ * * @author luoyue <1569097443@qq.com> */ -class Psr16StoreSession implements SessionStoreInterface +class Psr16SessionStore implements SessionStoreInterface { public function __construct( private readonly CacheInterface $cache,