Merge 4.3 into 4.4#8396
Merged
Merged
Conversation
…n non-resource parents (api-platform#8362)
…m#8371) * fix(mcp): make tools/list resilient to an empty registry tools/list reads from the SDK registry, which is populated once, when mcp.server is built. Under a persistent runtime (e.g. FrankenPHP worker mode) that single build can capture an empty registry and stay empty for the whole process, so tools/list returns [] while tools/call keeps working through the request-time Handler. Add a ListHandler (tagged mcp.request_handler, so it precedes the SDK's registry-backed list handlers) that loads API Platform elements into the registry on first use and reads back through the shared registry, so runtime registrations and registry decorators are preserved. Refs api-platform#8370 * Apply suggestions from code review Co-authored-by: Antoine Bluchet <soyuka@users.noreply.github.com>
# Conflicts: # CHANGELOG.md # src/State/Provider/DeserializeProvider.php
…olationFactory api-platform#8389 patched normalizeExpectedTypes() in DeserializeProvider on 4.3; 4.4 moved that logic to DenormalizationViolationFactory. Port the backed-enum backing-type reporting and result dedup so the fix survives the up-merge.
… test The 3-way merge of api-platform#8389 correctly dropped the deprecation-expectation guard (imports + #[IgnoreDeprecations] + version check) that api-platform#8287 had already removed from the sibling test, since 4.4's DenormalizationViolationFactory prefers getNotNormalizableValueErrors() over the deprecated getErrors() whenever it exists and so never triggers that deprecation on symfony/serializer >=8.1. But api-platform#8389 also introduced a brand-new test reusing the same now-unimported VersionParser/IgnoreDeprecations symbols, which the textual merge could not reconcile: it left the merged file referencing classes with no matching use statement. Remove the same stale guard from the new test for the same reason api-platform#8287 removed it from the old one.
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.
Routine 4.3 → 4.4 up-merge, bringing the pending 4.3 patch commits (including #8393, #8395) into the 4.4 line.
Manual resolutions
src/State/Provider/DeserializeProvider.php: kept 4.4's version (--ours). 4.4 refactored this provider so violation-building now lives inDenormalizationViolationFactoryInterface(normalizeExpectedTypes()no longer exists on the provider), so 4.3's inline patch from fix(serializer): report enum backing type in denormalization violations #8389 doesn't apply there anymore.src/Validator/DenormalizationViolationFactory.php::normalizeExpectedTypes()as a separate commit, since that's where 4.4 moved the equivalent logic.tests/Functional/EnumDenormalizationValidationTest.php: the 3-way merge silently produced a file referencingVersionParser/IgnoreDeprecationswith no matchingusestatements. 4.4 (test: drop stale serializer 8.1 getErrors() deprecation expectation #8287) had already dropped a stale symfony/serializer 8.1 deprecation-expectation guard from a sibling test, becauseDenormalizationViolationFactoryprefersgetNotNormalizableValueErrors()over the deprecatedgetErrors()whenever available and so never triggers that deprecation. fix(serializer): report enum backing type in denormalization violations #8389 introduced a new test reusing the same guard pattern, which the merge couldn't reconcile textually. Dropped the same stale guard from the new test for the same reason.CHANGELOG.md: union-resolved, keeping both branches' entries (4.4.0-alpha.1/alpha.2 sections on top, followed by the incoming 4.3.16/4.3.17 entries).Test plan
EnumDenormalizationValidationTest)