ci: test 4.3 on Symfony 6.4 - #8607
Merged
Merged
Conversation
A legacy collection with value types and no key types got a mixed key, because the is_array() check could only be true there. symfony/type-info 7.4 rejects mixed as an array key, so the kernel fails to boot on Symfony 6.4, which uses the legacy PropertyInfo path.
The Symfony lowest job resolves Symfony 7.4 because of mcp-bundle and laravel in require-dev, so 4.3 never ran on Symfony 6.4, which it declares. This let the api-platform#8564 regression ship.
PartialPaginationMongoDbTest used Laravel testbench traits by mistake, so PHPUnit could not load the suite once the Symfony 6.4 job removed laravel/framework. Also silence the always-true method_exists() check.
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.
4.3 declares Symfony
^6.4support, but no CI job ever ran it on Symfony 6.4. TheSymfony lowestjob resolves Symfony 7.4, becausesymfony/mcp-bundle(framework-bundle ^7.3) andlaravel/framework(http-kernel ^7.2) in require-dev force it. That is how #8523 shipped a Symfony 7.3-only call inApiTestCase(#8564).Three commits:
fix(metadata):PropertyInfoToTypeInfoHelpergave a legacy collection with no key type amixedkey, because theis_array()check could only be true at that point.symfony/type-info7.4 rejectsmixedas an array key, so the test kernel does not boot on Symfony 6.4, which uses the legacy PropertyInfo path. The key is nowint|string, which is the other, never-reached branch. A unit test fails with"mixed" is not a valid array key typebefore the fix.test: themcp:configuration and the MCP route import load only whenMcpBundleexists, with the sameclass_existscheck the kernel already uses to register the bundle.testBrowserKitAssertionsStayVerboseByDefaultis skipped when the setter does not exist.ci: a newPHPUnit (PHP 8.2) (Symfony 6.4)job. It removes the require-dev packages that need Symfony 7 (MCP, Laravel, json-streamer, object-mapper, var-exporter), pins the^6.4Symfony constraints to6.4.*andsymfony/type-infoto7.4.*, and runs the suite. It iscontinue-on-erroruntil the first full run is known.Checked locally on Symfony 6.4.47: the kernel boots,
ComparisonFilterTest::testOpenApiDocumentationpasses, and with the #8564 guard removed the same test fails withCall to undefined method ...setBrowserKitAssertionsAsVerbose(). On the normal install,McpTeststill passes (14 tests).