test(parameters): skip the uri variable test before schema setup - #8528
Merged
Conversation
setUp() calls recreateSchema(), which rewrites \Entity\ to \Document\ under ODM, but Base64UriVariableDummy has no ODM counterpart. Both tests already meant to skip on mongodb; the guards just sat in the test bodies, which run after setUp() has failed. Claude-Session: https://claude.ai/code/session_01FmRmcWx8J7PS374edGFBdE
soyuka
force-pushed
the
fix/mongodb-urivariable-schema
branch
from
September 11, 2026 19:47
aac7586 to
051781d
Compare
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
PHPUnit (PHP 8.5) (MongoDB), the last non-release-lag failure on main.The bug
setUp()callsrecreateSchema([Base64UriVariableDummy::class, Dummy::class]). Under ODM,RecreateSchemaTraitrewrites\Entity\to\Document\and callsdropDocumentCollection()on the result — but onlytests/Fixtures/TestBundle/Entity/Base64UriVariableDummy.phpexists.Both tests already intended to skip on MongoDB. The guards just sat inside the test bodies, which PHPUnit reaches only after
setUp()has already thrown:So the fix is to hoist the author's own guard into
setUp()and drop the two now-dead in-body copies.Why not add the missing ODM fixture
Because guard placement, not fixture parity, is the established convention here. 31 Entity fixtures passed to
recreateSchema()across the suite have noDocument/counterpart, and only this one test fails — the other 30 sit in tests that guard before the schema call. Adding aDocument/Base64UriVariableDummy.phpwould make this test inconsistent with 30 existing cases and would create an ODM fixture for a feature the author deliberately chose not to exercise on ODM.Pre-existing, not new
Introduced by #8491 and merged red on 2026-09-02. It was invisible on main only because #7887's bootstrap fatal (
Class "ApiPlatform\Symfony\Bundle\Test\ApiTestCase" not found) aborted the suite before this job could report. Two runs nine days apart show the identical two errors:33624793541(#8491's own CI)Tests: 2061 … Errors: 234615693926(today)Tests: 2121 … Errors: 2Checks
php -lclean. CS Fixer reports 0 of 3024 files to fix. PHPStan on this file is unchanged by the diff — 4 pre-existingunknown classentries from local Doctrine resolution before and after, line numbers shifted only.https://claude.ai/code/session_01FmRmcWx8J7PS374edGFBdE