symfony / mercure-notifier
Symfony Mercure Notifier Bridge
Package info
github.com/symfony/mercure-notifier
Type:symfony-notifier-bridge
pkg:composer/symfony/mercure-notifier
v8.1.0
2026-05-29 05:06 UTC
Requires
- php: >=8.4.1
- symfony/mercure: ^0.5.2|^0.6|^0.7
- symfony/notifier: ^7.4|^8.0
- symfony/service-contracts: ^2.5|^3
This package is auto-updated.
Last update: 2026-06-05 06:51:14 UTC
README
Provides Mercure integration for Symfony Notifier.
DSN example
MERCURE_DSN=mercure://HUB_ID?topic=TOPIC
where:
HUB_IDis the Mercure hub idTOPICis the topic IRI (optional, default:https://symfony.com/notifier. Could be either a single topic:topic=https://fooor multiple topics:topic[]=/foo/1&topic[]=https://bar)
Adding Options to a Chat Message
With a Mercure Chat Message, you can use the MercureOptions class to add
message options.
use Symfony\Component\Notifier\Message\ChatMessage; use Symfony\Component\Notifier\Bridge\Mercure\MercureOptions; $chatMessage = new ChatMessage('Contribute To Symfony'); $options = new MercureOptions( ['/topic/1', '/topic/2'], true, 'id', 'type', 1, ['tag' => '1234', 'body' => 'TEST'] ); // Add the custom options to the chat message and send the message $chatMessage->options($options); $chatter->send($chatMessage);
Sponsor
This package is looking for a backer.
Help Symfony by sponsoring its development!