Prepare package slicing by strict namespace refactoring into Client, Schema, and Server - #493
Open
chr-hertel wants to merge 1 commit into
Open
Prepare package slicing by strict namespace refactoring into Client, Schema, and Server#493chr-hertel wants to merge 1 commit into
chr-hertel wants to merge 1 commit into
Conversation
chr-hertel
force-pushed
the
package-slicing
branch
from
September 1, 2026 20:53
c8d14f9 to
d5c5cf5
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Numerous tests expect exceptions from the wrong slice, several examples reference invalid namespaces, and Deptrac is not enforced by CI.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Refactors the SDK into distinct Client, Schema, and Server namespaces in preparation for package slicing.
Changes:
- Moves facades, capabilities, events, exceptions, and shared protocol types into slice-specific namespaces.
- Updates tests, examples, documentation, and autoloading references.
- Adds Deptrac boundaries and inspector snapshots.
File summaries
| File group | Description |
|---|---|
src/Client/** |
Refactors client APIs and exceptions. |
src/Schema/** |
Consolidates shared protocol types and schema exceptions. |
src/Server/** |
Refactors server APIs, capabilities, events, and exceptions. |
tests/Unit/** |
Migrates unit tests and fixtures. |
tests/Integration/** |
Updates integration imports and fixtures. |
tests/Conformance/** |
Updates conformance entry points. |
tests/Inspector/** |
Adds structured-result snapshots. |
examples/** |
Migrates client and server examples. |
docs/**, README.md |
Updates public namespace guidance. |
composer.json, deptrac.yaml, phpstan.dist.neon, .gitignore |
Configures architecture tooling and relocated paths. |
Review details
Suppressed comments (1)
docs/client/errors.md:24
- Client requests throw
Mcp\Client\Exception\RequestException. Catching the server-slice sibling will not handle$client->callTool()failures.
- Files reviewed: 299/423 changed files
- Comments generated: 43
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
chr-hertel
force-pushed
the
package-slicing
branch
3 times, most recently
from
September 1, 2026 22:41
780db8a to
fc18fd4
Compare
…Schema, and Server
chr-hertel
force-pushed
the
package-slicing
branch
from
September 1, 2026 22:43
fc18fd4 to
42859cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposal to rework namespaces in favor of slicing
mcp/sdkpackage, see #489Mcp\Client,Mcp\Schema, orMcp\ServerMcp\Exceptioninto component specific namespacesNext steps would be: