symfony/mercure-bundle
Symfony bundle that integrates the Mercure Component into full-stack Symfony applications, making it easy to add real-time push updates over Server-Sent Events. Provides configuration, dependency injection setup, and seamless hub integration for publishing and subscribing to live updates.
url to the default aud claim of protocol 1.0 publisher tokens, which are sent there: a hub reached through different internal and public URLs no longer needs resource_identifier to accept publicationsprotocol_version to 1.0 now that Mercure hub 1.0 is stable; set protocol_version: 0.x to keep talking to a 0.x hub. Hubs relying on the default now use the __Secure-mercure_access_token cookie name (mercure_access_token when kernel.debug is enabled, as browsers drop __Secure- cookies over plain HTTP; it matches the hub's playground default), and jwt.secret hubs must define the iss, sub and client_id claims in jwt.claims or the container fails to compileprotocol_version also accepts ProtocolVersion enum caseshttp_client per-hub option, to publish through a dedicated HTTP client service (e.g. a scoped client with a short timeout)RemoteHubInterface autowirable, globally for a remote default hub and per hub through named arguments (e.g. RemoteHubInterface $fooHub)symfony/mercure ^0.9Publisher / PublisherInterface / TraceablePublisher services and aliases, and the StaticJwtProvider service (mercure.hub.*.jwt_provider). Apps must use Hub / HubInterface / TraceableHub and StaticTokenProvider (mercure.hub.*.jwt.provider) instead. This removes the symfony/mercure 0.5 deprecations that were triggered on every container boot even when the Hub API was used exclusively (#121)MercureDataCollector::getPublishers() (deprecated since 0.3 in favor of getHubs())Hub and FrankenPhpHub at runtime, through a factory, instead of guessing at container build time: an empty url (an unset or empty MERCURE_URL, which is all Docker Compose can express) now reliably selects FrankenPHP's built-in Mercure hub, which is also autowirable through HubInterface like any other hub. url and public_url both default to null unconditionallypublisher and subscriber per-hub options, an alternative to jwt to sign publisher and subscriber tokens with different keysdefault_hub naming an undefined hub failing with a TypeError instead of a configuration errorTraceableHub keeping the messages of previous requests in long-running processes (e.g. FrankenPHP's worker mode)protocol_version (0.x, default, or 1.0) and cookie_name per-hub optionsjwt.jwks_uri and jwt.key_id, fetching the signing key from a JSON Web Key Set endpoint via WebTokenFactory instead of jwt.secret (requires web-token/jwt-library, Mercure 1.0 hubs only)jwt.claims (e.g. iss/sub/client_id), required by RFC 9068 when using jwt.secret/jwt.jwks_uri on a protocol_version: 1.0 hub; aud defaults to the hub's own URL when not set. Missing required claims fail at container compile time, and a 0.x hub without jwt.claims keeps minting byte-identical legacy tokens (no DefaultClaimsTokenFactory wrapping, no automatic aud)symfony/mercure ^0.8symfony/mercureExtension class from the DependencyInjection componentsymfony/mercure dependency to supported versionsbranch-aliasmercure_publish() functionTurboStreamListenRenderersymfony/ux-turbo 2.9 using symfony/stimulus-bundlelcobucci/jwt 5.0Authorization cookie lifetime by @chalasr in https://github.com/symfony/mercure-bundle/pull/69Full Changelog: https://github.com/symfony/mercure-bundle/compare/v0.3.4...v0.3.5
jwt nor the jwt_provider configuration key is defined.enable_profiler configurationAuthorization classsymfony/mercure 0.5symfony/ux-turbomercure.publisher tag on publisher servicesMercureDataCollectorSymfony\Component\Mercure\PublisherInterface instances (using Symfony\Component\Mercure\Publisher for autowiring is deprecated)Inject the http_client service when available
Fix a deprecation triggered by the TreeBuilder
Initial release
How can I help you explore Laravel packages today?