Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mercure Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7
v0.6.1
  • Add 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 publications
v0.6.0
  • Default protocol_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 compile
  • protocol_version also accepts ProtocolVersion enum cases
  • Add the http_client per-hub option, to publish through a dedicated HTTP client service (e.g. a scoped client with a short timeout)
  • Make RemoteHubInterface autowirable, globally for a remote default hub and per hub through named arguments (e.g. RemoteHubInterface $fooHub)
  • Allow symfony/mercure ^0.9
  • BC break: Stop registering the legacy Publisher / 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)
  • BC break: Remove MercureDataCollector::getPublishers() (deprecated since 0.3 in favor of getHubs())
  • Pick between 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 unconditionally
  • Add the publisher and subscriber per-hub options, an alternative to jwt to sign publisher and subscriber tokens with different keys
  • Fix a default_hub naming an undefined hub failing with a TypeError instead of a configuration error
  • Fix the profiler's TraceableHub keeping the messages of previous requests in long-running processes (e.g. FrankenPHP's worker mode)
v0.5.0
  • Add support for the Mercure protocol 1.0, alongside the existing 0.x protocol: new protocol_version (0.x, default, or 1.0) and cookie_name per-hub options
  • Add jwt.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)
  • Add 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)
  • Require symfony/mercure ^0.8
  • Require PHP 8.2, up from 8.1, following symfony/mercure
v0.4.3
  • Extend the Extension class from the DependencyInjection component
  • Bound the symfony/mercure dependency to supported versions
  • Fix branch-alias
v0.4.2
  • Fix Twig extension registration when using Symfony Mercure 0.7 (again)
v0.4.1
  • Fix Twig extension registration when using Symfony Mercure 0.7
v0.4.0
  • Add support for FrankenPHP's mercure_publish() function
  • Allow Symfony 8
  • Compatibility with PHP 8.5
  • Pass Twig as dependency of TurboStreamListenRenderer
  • Fix cache warmup without JWT secrets
  • Drop support for unmaintained PHP and Symfony versions
v0.3.9
  • Explicitly mark method parameters as nullable
  • Adapt icon to profiler redesign
v0.3.8
  • Allow Symfony 7
v0.3.7
  • Support for symfony/ux-turbo 2.9 using symfony/stimulus-bundle
v0.3.6
  • Compatibility with lcobucci/jwt 5.0
v0.3.5

What's Changed

Full Changelog: https://github.com/symfony/mercure-bundle/compare/v0.3.4...v0.3.5

v0.3.4
  • Add support for JWT signers requiring a passphrase
  • Throw an exception if neither the jwt nor the jwt_provider configuration key is defined.
v0.3.3
  • Deprecate enable_profiler configuration
  • Add support for Mercure Component 0.6
  • Compatibility with Symfony 6.0
v0.3.2
  • Full compatibility with PHP 7.1
  • Enable JWT support by default
v0.3.1
  • Add a configuration option to set a defaut expiration for the JWT and the cookie when using the Authorization class
v0.3.0
  • Upgrade to symfony/mercure 0.5
  • Add integration with symfony/ux-turbo
  • Register autowiring aliases for hubs
  • Add mercure.publisher tag on publisher services
v0.2.6
  • Expose privateness of published messages in profiler panel
  • Compatibility with PHP 8
v0.2.5
  • Fix a bug in the debugger panel
  • Compatibility with Symfony 5.1
v0.2.4
  • Compatibility with Mercure 0.10
0.2.3
  • Fix a bug preventing the profiler to work
v0.2.2
  • Fix compatibility with Symfony 5
v0.2.1
  • Fix a crash in MercureDataCollector
v0.2.0
  • Compatibility with Symfony 5
  • Add a profiler panel
  • Autowire Symfony\Component\Mercure\PublisherInterface instances (using Symfony\Component\Mercure\Publisher for autowiring is deprecated)
v0.1.2

Inject the http_client service when available

v0.1.1

Fix a deprecation triggered by the TreeBuilder

v0.1.0

Initial release

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator