fix(test): support symfony/mercure 0.8 in test fixtures - #8458
Merged
Conversation
symfony/mercure 0.8.0 (2026-08-11) added getProtocolVersion() and getCookieName() to HubInterface. The TestHub decorator did not implement them, so every CI job died at container warmup before a single test ran -- 20 jobs red on 4.3, with no green run since 2026-07-08. symfony/mercure-bundle was declared as "*" in all four composer.json files, which let a breaking 0.x release land unannounced. Constrain it to ^0.4.3|^0.5 so both majors stay covered: 0.4.3 resolves mercure ^0.6.1|^0.7 for the lowest jobs, 0.5.0 resolves ^0.8. ProtocolVersion does not exist before 0.8, but PHP resolves return types lazily and nothing calls these methods on older versions. Verified: cache warmup and the Mercure functional tests pass under both 0.7.2 and 0.8.0.
This was referenced Aug 16, 2026
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.
Unblocks 4.3 CI, which has produced no test signal since 2026-07-08.
What broke
symfony/mercurev0.8.0 was released 2026-08-11 and added two methods toHubInterface:tests/Fixtures/TestBundle/Mercure/TestHub.phpis a decorator implementingHubInterfaceand did not define them:This kills the container at cache warmup, so all 20 failing jobs died before PHPUnit started — zero tests ran. It is entirely test infrastructure: nothing in
src/implementsHubInterface, and no shipped code is affected.It landed silently because
symfony/mercure-bundlewas declared as"*"in all four composer files — a bare wildcard on a0.xcomponent.What changed
TestHubimplements both new methods, delegating to the inner hub."symfony/mercure-bundle": "*"→"^0.4.3|^0.5"incomposer.json,src/GraphQl/composer.json,src/Serializer/composer.json,src/Symfony/composer.json. All four arerequire-dev; thesuggestentry insrc/Symfony/composer.jsonis untouched.The constraint deliberately spans the breaking boundary so both majors stay covered:
^0.6.1|^0.7— what thelowestjobs install^0.8ProtocolVersiondoes not exist before 0.8. Declaring it as a return type is safe because PHP resolves return types lazily and nothing calls these methods on older versions — but that is an assumption worth testing rather than trusting, so it was tested.Verification
Both majors, cache warmup plus the Mercure functional tests:
ProtocolVersionpresentphpunit tests/Functional --filter Mercurephp-cs-fixer: no changes. PHPStan on the changed fixture: no errors.
Note
Branches
4.4andmaincarry the identicalTestHuband the same"*"constraint.4.4last ran CI on 2026-07-12, before mercure 0.8.0, so it has not detonated yet — it will on the next push. This should merge up rather than be fixed separately.