FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Server] Fail when discovery dependency is missing by ousamabenyounes · Pull Request #432 · modelcontextprotocol/php-sdk · GitHub

Repository navigation

[Server] Fail when discovery dependency is missing - #432

Open
ousamabenyounes wants to merge 1 commit into
modelcontextprotocol:mainfrom
ousamabenyounes:fix/issue-398
Open

ousamabenyounes wants to merge 1 commit into
modelcontextprotocol:mainfrom
ousamabenyounes:fix/issue-398

Conversation

Copy link
Copy Markdown
Contributor

Summary

  • fail immediately when file-based discovery is configured without symfony/finder
  • preserve custom discoverers, which do not require Finder
  • cover the missing optional dependency in an isolated regression test

Fixes #398.

Test verification (RED → GREEN)

Reproduced on unmodified main with production-only dependencies:

BUG: build succeeded with Mcp\Server

With the regression test present and the production fix reverted (RED):

Failed asserting that exception of type "Mcp\Exception\RuntimeException" is thrown.
FAILURES!
Tests: 1, Assertions: 2, Failures: 1.

With the fix applied (GREEN):

OK (1 test, 3 assertions)

Full local validation:

Composer validation: passed
PHP CS Fixer: passed
PHPStan: passed
PHPUnit unit + integration: OK (1237 tests, 3384 assertions)
phpDocumentor: passed
Changed executable line coverage: 2/2

chr-hertel added needs maintainer action Potentially serious issue - needs proactive fix and maintainer attention on hold Blocked on external dependency (SEP, other PR, decision) labels Aug 18, 2026

This branch has not been deployed

No deployments
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

Labels

needs maintainer action Potentially serious issue - needs proactive fix and maintainer attention on hold Blocked on external dependency (SEP, other PR, decision)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Builder::build() silently skips configured file-based discovery when symfony/finder is missing — should fail loudly

2 participants


Back | FazBrowse Home | New Git URL