fix(mcp): support mcp/sdk 0.7 and pin symfony/mcp-bundle#8425
Merged
Conversation
symfony/mcp-bundle dev-main moved to mcp/sdk ^0.7 with the v0.12.0 release, which no longer resolves against the ^0.6 pin. Composer install fails and every CI job dies before vendor/autoload.php exists. Widen mcp/sdk to ^0.6 || ^0.7 and pin symfony/mcp-bundle to ^0.12 so an upstream dev-main release cannot break the build again. McpController gained a required MiddlewareFactory argument in v0.12.0, so pass one from the Laravel provider. Passing a default-constructed factory keeps the SDK secure defaults, matching the Symfony bundle.
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.
Fixes the full CI blackout on
4.3(and, after up-merge,4.4/main): every job currently dies beforevendor/autoload.phpexists.Why CI is red
composer installis unresolvable:symfony/mcp-bundlewas required asdev-main. Itsv0.12.0release (2026-07-21) moved tomcp/sdk ^0.7, which no longer satisfies our^0.6pin. No API Platform commit caused this — it is dependency drift through an unpinned dev branch.^0.6^0.6|^0.7^0.7A second, older failure has the same root cause: the
Laravel (PHP 8.x)jobs have been red since at least 2026-07-12 with 10McpTestfailures, becauseMcpController::__construct()gained a requiredMiddlewareFactoryargument upstream:Changes
mcp/sdkwidened to^0.6 || ^0.7in the rootcomposer.jsonand insrc/Mcp/composer.json— this part is @jbtronics' work in [MCP] Allow MCP sdk 0.7 #8422.symfony/mcp-bundlepinned to^0.12(root +src/Laravel) instead ofdev-main, so an upstreammainrelease can no longer break the build without a deliberate bump.ApiPlatformProviderpasses aMiddlewareFactorytoMcpController. A default-constructed factory returnsnullfromcreate(), which keeps the SDK's secure defaults (CORS, DNS rebinding protection, protocol version) — same behaviour as the Symfony bundle's default.Verified locally
composer install(root)v0.7.0+ bundlev0.12.0tests/Functional/McpTest.phpsrc/Mcp/TestsNotes
src/Mcp/composer.json. That alone leaves the root^0.6pin in place, so its own CI is still fully red. Opened against4.3rather thanmainbecause the breakage exists on all three branches and should flow up.config/api-platform.php.