Skip to content

ci: test 4.3 on Symfony 6.4 - #8607

Merged
soyuka merged 5 commits into
api-platform:4.3from
soyuka:ci/4.3-symfony-64-job
Sep 29, 2026
Merged

soyuka merged 5 commits into
api-platform:4.3from
soyuka:ci/4.3-symfony-64-job

Conversation

@soyuka

@soyuka soyuka commented Sep 29, 2026

Copy link
Copy Markdown
Member
Q A
Branch? 4.3
Tickets Follow-up to #8564
License MIT

4.3 declares Symfony ^6.4 support, but no CI job ever ran it on Symfony 6.4. The Symfony lowest job resolves Symfony 7.4, because symfony/mcp-bundle (framework-bundle ^7.3) and laravel/framework (http-kernel ^7.2) in require-dev force it. That is how #8523 shipped a Symfony 7.3-only call in ApiTestCase (#8564).

Three commits:

  1. fix(metadata): PropertyInfoToTypeInfoHelper gave a legacy collection with no key type a mixed key, because the is_array() check could only be true at that point. symfony/type-info 7.4 rejects mixed as an array key, so the test kernel does not boot on Symfony 6.4, which uses the legacy PropertyInfo path. The key is now int|string, which is the other, never-reached branch. A unit test fails with "mixed" is not a valid array key type before the fix.
  2. test: the mcp: configuration and the MCP route import load only when McpBundle exists, with the same class_exists check the kernel already uses to register the bundle. testBrowserKitAssertionsStayVerboseByDefault is skipped when the setter does not exist.
  3. ci: a new PHPUnit (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.4 Symfony constraints to 6.4.* and symfony/type-info to 7.4.*, and runs the suite. It is continue-on-error until the first full run is known.

Checked locally on Symfony 6.4.47: the kernel boots, ComparisonFilterTest::testOpenApiDocumentation passes, and with the #8564 guard removed the same test fails with Call to undefined method ...setBrowserKitAssertionsAsVerbose(). On the normal install, McpTest still passes (14 tests).

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.
@soyuka
soyuka merged commit d3b8406 into api-platform:4.3 Sep 29, 2026
110 of 117 checks passed
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