Repository navigation
Conversation
This was referenced Nov 5, 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.
Fixes #138, following the API discussed there.
When
framework.testis enabled, each hub is now decorated with a recording hub that keeps the updates instead of publishing them. Nowhen@testconfig orHubStubis needed anymore, it doesn't depend onkernel.debugand the profiler, and it also coversFrankenPhpHub, which never goes through the HTTP client.publish()returns the update's id, or a generatedurn:uuid:one.The new
MercureAssertionsTraitreads these updates from aKernelTestCaseor aWebTestCase, where$hub = nullmeans all the hubs:A few implementation notes:
TraceableHub, so the profiler still lists the updates in the test env.kernel.reset, like the traceable hub, so each request starts empty (same behavior asMailerAssertionsTrait).assertMercureUpdateCount(0)would otherwise fail before anything was published.\InvalidArgumentExceptionlisting the defined hubs, rather than silently counting 0 updates.In the issue I suggested leaving real publishing in the test env out until someone asks for it, but Panther's web server runs in the
testenv by default, so its Mercure end-to-end tests would silently stop receiving updates. The newrecord_updates_in_testhub option (defaulttrue) lets them opt out, and the CHANGELOG flags it as a behavior change.Docs: symfony/symfony-docs#23471