Repository navigation
Default protocol_version to 1.0 - #130
Merged
Merged
Conversation
stof
reviewed
Oct 7, 2026
| @@ -98,12 +98,12 @@ public function getConfigTreeBuilder(): TreeBuilder | |||
| ->scalarNode('bus')->info('Name of the Messenger bus where the handler for this hub must be registered. Default to the default bus if Messenger is enabled.')->end() | |||
| ->enumNode('protocol_version') | |||
| ->values(array_column(ProtocolVersion::cases(), 'value')) | |||
Member
There was a problem hiding this comment.
this should probably use enumFqcn() instead of values to support the PHP enum fully (supporting both its backing value and the enum cases themselves, which provides a better PHP API).
Note that this would also remove the need for ProtocolVersion::from in the DI extension as the value becomes the enum instance, not its string value.
| CHANGELOG | ||
| ========= | ||
|
|
||
| 0.6.0 |
Member
There was a problem hiding this comment.
should this become a version 1.0 of the bundle ?
Member
Author
There was a problem hiding this comment.
I'm not sure, we were also talking about merging it in the main monorepo at some point. Maybe could we at least release a 1.0 version with all deprecations dropped later?
Mercure hub 1.0 is now stable. Set "protocol_version: 0.x" to keep talking to a 0.x hub.
Browsers drop "__Secure-" cookies over plain HTTP, which breaks local setups such as a hub exposed on port 80 for the Symfony CLI. The prefix-less name also matches the hub's "playground" default.
enumFqcn() on symfony/config 7.3+, enum values normalized from their backing value on 6.4.
dunglas
force-pushed
the
protocol-1.0-default
branch
from
October 7, 2026 10:10
233b20b to
1dee2df
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.
Mercure hub 1.0 is stable, so
protocol_versionnow defaults to1.0. Setprotocol_version: 0.xto keep talking to a 0.x hub.The default cookie name becomes
__Secure-mercure_access_token, except whenkernel.debugis on: there it ismercure_access_token. Browsers drop__Secure-cookies over plain HTTP, andmercure_access_tokenis the name the hub uses inplaygroundmode.BC break:
jwt.secrethubs withoutjwt.claims(iss,sub,client_id) now fail at container compile time.Related:
playgroundmode on plain HTTP for the Symfony CLI. With bundle 0.5 andprotocol_version: 1.0,Authorizationthrows as soon as it sets a cookie (for example, the Twigmercure()function with thesubscribeoption), because__Secure-mercure_access_tokencan't be used over HTTP. The debug default now matches the playground cookie name, and a 0.6 recipe can dropprotocol_version: '1.0'.playgroundmode, so the hub readsmercure_access_tokenwhile bundle 0.5 sets__Secure-mercure_access_token. The debug default fixes this mismatch. Apps now get 1.0 tokens by default, soprotocol_version_compatibility 8is only needed for apps that pinprotocol_version: 0.x.Companion of symfony/mercure#143