[Schema][Client][Server] Deprecate Roots, Sampling and Logging (SEP-2577) (#427)
* [Schema][Client][Server] Deprecate Roots, Sampling and Logging (SEP-2577) * Emit runtime deprecation notices and document the migration (SEP-2596)
This commit is contained in:
parent
1ff9a74521
commit
590afb575b
1 changed files with 120 additions and 0 deletions
|
|
@ -18,6 +18,9 @@ use Mcp\Schema\Notification\LoggingMessageNotification;
|
|||
* Handler for logging message notifications from the server.
|
||||
*
|
||||
* @author Kyrian Obikwelu <koshnawaza@gmail.com>
|
||||
*
|
||||
* @deprecated since protocol revision 2026-07-28 (SEP-2577), earliest removal 2027-07-28.
|
||||
* Log to stderr (stdio) or use OpenTelemetry instead.
|
||||
*/
|
||||
class LoggingNotificationHandler implements NotificationHandlerInterface
|
||||
{
|
||||
|
|
@ -27,6 +30,7 @@ class LoggingNotificationHandler implements NotificationHandlerInterface
|
|||
public function __construct(
|
||||
private readonly mixed $callback,
|
||||
) {
|
||||
trigger_deprecation('mcp/sdk', '0.8', 'MCP logging is deprecated since protocol revision 2026-07-28 (SEP-2577); log to stderr or use OpenTelemetry instead.');
|
||||
}
|
||||
|
||||
public function supports(Notification $notification): bool
|
||||
|
|
|
|||
Loading…
Reference in a new issue