|
2 | 2 |
|
3 | 3 | All notable changes to `php-mcp/server` will be documented in this file. |
4 | 4 |
|
| 5 | +## v3.0.0 - 2025-06-21 |
| 6 | + |
| 7 | +This release brings support for the latest MCP protocol version along with enhanced schema generation, new transport capabilities, and streamlined APIs. |
| 8 | + |
| 9 | +### ✨ New Features |
| 10 | + |
| 11 | +* **StreamableHttpServerTransport**: New transport with resumability, event sourcing, and JSON response mode for production deployments |
| 12 | +* **Smart Schema Generation**: Automatic JSON schema generation from method signatures with optional `#[Schema]` attribute enhancements |
| 13 | +* **Completion Providers**: `#[CompletionProvider]` attribute for auto-completion in resource templates and prompts |
| 14 | +* **Batch Request Processing**: Full support for JSON-RPC 2.0 batch requests |
| 15 | +* **Enhanced Session Management**: Multiple session backends (array, cache, custom) with persistence and garbage collection |
| 16 | + |
| 17 | +### 🔥 Breaking Changes |
| 18 | + |
| 19 | +* **Schema Package Integration**: Now uses `php-mcp/schema` package for all DTOs, requests, responses, and content types |
| 20 | +* **Session Management**: `ClientStateManager` replaced with `SessionManager` and `Session` classes |
| 21 | +* **Component Reorganization**: `Support\*` classes moved to `Utils\*` namespace |
| 22 | +* **Request Processing**: `RequestHandler` renamed to `Dispatcher` |
| 23 | + |
| 24 | +*Note: Most of these changes are internal and won't affect your existing MCP element definitions and handlers.* |
| 25 | + |
| 26 | +### 🔧 Enhanced Features |
| 27 | + |
| 28 | +* **Improved Schema System**: The `#[Schema]` attribute can now be used at both method-level and parameter-level (previously parameter-level only) |
| 29 | +* **Better Error Handling**: Enhanced JSON-RPC error responses with proper status codes |
| 30 | +* **PSR-20 Clock Interface**: Time management with `SystemClock` implementation |
| 31 | +* **Event Store Interface**: Pluggable event storage for resumable connections |
| 32 | + |
| 33 | +### 📦 Dependencies |
| 34 | + |
| 35 | +* Now requires `php-mcp/schema` ^1.0 |
| 36 | +* Enhanced PSR compliance (PSR-3, PSR-11, PSR-16, PSR-20) |
| 37 | + |
| 38 | +### 🚧 Migration Guide |
| 39 | + |
| 40 | +#### Capabilities Configuration |
| 41 | + |
| 42 | +**Before:** |
| 43 | + |
| 44 | +```php |
| 45 | +->withCapabilities(Capabilities::forServer( |
| 46 | + resourcesEnabled: true, |
| 47 | + promptsEnabled: true, |
| 48 | + toolsEnabled: true, |
| 49 | + resourceSubscribe: true |
| 50 | +)) |
| 51 | + |
| 52 | +``` |
| 53 | +**After:** |
| 54 | + |
| 55 | +```php |
| 56 | +->withCapabilities(ServerCapabilities::make( |
| 57 | + resources: true, |
| 58 | + prompts: true, |
| 59 | + tools: true, |
| 60 | + resourcesSubscribe: true |
| 61 | +)) |
| 62 | + |
| 63 | +``` |
| 64 | +#### Transport Upgrade (Optional) |
| 65 | + |
| 66 | +For production HTTP deployments, consider upgrading to the new `StreamableHttpServerTransport`: |
| 67 | + |
| 68 | +**Before:** |
| 69 | + |
| 70 | +```php |
| 71 | +$transport = new HttpServerTransport(host: '127.0.0.1', port: 8080); |
| 72 | + |
| 73 | +``` |
| 74 | +**After:** |
| 75 | + |
| 76 | +```php |
| 77 | +$transport = new StreamableHttpServerTransport(host: '127.0.0.1', port: 8080); |
| 78 | + |
| 79 | +``` |
| 80 | +### 📚 Documentation |
| 81 | + |
| 82 | +* Complete README rewrite with comprehensive examples and deployment guides |
| 83 | +* New production deployment section covering VPS, Docker, and SSL setup |
| 84 | +* Enhanced schema generation documentation |
| 85 | +* Migration guide for v2.x users |
| 86 | + |
| 87 | +**Full Changelog**: https://github.com/php-mcp/server/compare/2.3.1...3.0.0 |
| 88 | + |
5 | 89 | ## v2.3.1 - 2025-06-13 |
6 | 90 |
|
7 | 91 | ### What's Changed |
@@ -169,6 +253,7 @@ This is a major refactoring with significant breaking changes: |
169 | 253 |
|
170 | 254 |
|
171 | 255 |
|
| 256 | + |
172 | 257 | ``` |
173 | 258 | The `http` and `reactphp` options for `run()` were already invalid and are fully removed. |
174 | 259 |
|
|
0 commit comments