Skip to content

Conversation

@bigdevlarry
Copy link
Contributor

Add missing handler for resource subscribe/unsubscribe handlers

Motivation and Context

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@chr-hertel chr-hertel added this to the 0.4.0 milestone Jan 4, 2026
@bigdevlarry bigdevlarry marked this pull request as ready for review January 8, 2026 22:20
@bigdevlarry bigdevlarry force-pushed the Add-missing-handler-for-Resource-Subscribe-Unsubscribe branch from 88d6e7a to 627f00b Compare January 8, 2026 22:22
@bigdevlarry bigdevlarry force-pushed the Add-missing-handler-for-Resource-Subscribe-Unsubscribe branch from 627f00b to 95be722 Compare January 8, 2026 22:29
* file that was distributed with this source code.
*/

ini_set('display_errors', '0');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prevents PHP from printing errors to the response body fixes the JSON-RPC error of outputting html

/**
* @var array<string, array<string, SessionInterface>>
*/
private array $resourceSubscriptions = [];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we make the subscription persistent to make it work across multiple request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants