Skip to content

fix(mcp): require the metadata release carrying the APIs the component uses - #8554

Open
Amoifr wants to merge 1 commit into
api-platform:4.3from
Amoifr:fix-mcp-lowest-metadata-floor
Open

Amoifr wants to merge 1 commit into
api-platform:4.3from
Amoifr:fix-mcp-lowest-metadata-floor

Conversation

@Amoifr

@Amoifr Amoifr commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

PHPUnit api-platform/mcp (PHP 8.5 lowest) fails on every pull request targeting 4.3, including #8525 and #8530, with 11 errors:

Error: Call to undefined method ApiPlatform\Metadata\McpTool::getTitle()
Error: Class "ApiPlatform\Metadata\Exception\BadRequestException" not found

The component allows api-platform/metadata: ^4.3, so composer update --prefer-lowest resolves v4.3.0, which carries neither API:

Used Where Released in
McpTool::getTitle() Capability/Registry/Loader.php:66 v4.3.5
Metadata\Exception\BadRequestException Tests/Server/HandlerTest.php:345 v4.3.19

The second one arrived with #8525, which fixed the previous round of this on the same job, so the floor simply trailed behind the code twice.

Raising it to ^4.3.19 matches what the other components already do, api-platform/serializer:^4.3.12 and api-platform/validator:^4.3.1.

Verified by running what the workflow runs, in src/Mcp:

composer update --prefer-lowest   # v4.3.0  -> Tests: 80, Errors: 11
composer update --prefer-lowest   # v4.3.19 -> OK (80 tests, 248 assertions)

4.4 and main are unaffected, they require ^4.4 and ^5.0.

…t uses

The component allows api-platform/metadata ^4.3, so the lowest install resolves
4.3.0, which has neither McpTool::getTitle(), used by the registry loader since
v4.3.5, nor Metadata\Exception\BadRequestException, added in v4.3.19.
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.

1 participant