Skip to content

[Notify] Add support for MercureBundle ^0.6 - #4056

Merged
Kocal merged 1 commit into
symfony:3.xfrom
Kocal:claude/mercurebundle-0-6-support-bbeb01
Oct 9, 2026
Merged

Kocal merged 1 commit into
symfony:3.xfrom
Kocal:claude/mercurebundle-0-6-support-bbeb01

Conversation

@Kocal

@Kocal Kocal commented Oct 8, 2026 •

Copy link
Copy Markdown
Member
Q A
Bug fix? no
New feature? yes
Deprecations? no
Documentation? yes
Issues
License MIT

MercureBundle 0.6 makes the Mercure protocol 1.0 the default, and a protocol 1.0 subscriber passes its topics in the match query parameter instead of topic. The Notify Stimulus controller only knew topic, so on a hub left on that default it subscribed to nothing.

stream_notifications() now renders the hub's protocol as a Stimulus controller value, and the controller builds its EventSource URLs with match on the protocol 1.0. A hub on the protocol 0.x renders no such value and keeps topic, so existing markup is unaffected.

The two test apps now pin protocol_version: 0.x, which is what their hub actually speaks.

@Kocal Kocal self-assigned this Oct 8, 2026
@carsonbot carsonbot added Documentation Improvements or additions to documentation Feature New Feature Notify Status: Needs Review Needs to be reviewed labels Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

📊 Packages dist files size difference

Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.
Please review the changes and make sure they are expected.

FileBefore (Size / Gzip)After (Size / Gzip)
Notify
controller.d.ts 615 B / 351 B 731 B+19% 📈 / 382 B+9% 📈
controller.js 1.88 kB / 793 B 2.01 kB+7% 📈 / 861 B+9% 📈

@Kocal
Kocal force-pushed the claude/mercurebundle-0-6-support-bbeb01 branch from ba4c6af to ddba479 Compare October 8, 2026 14:43
@Kocal Kocal changed the title [Notify] Add support for MercureBundle ^0.6 and Mercure ^0.9 [Notify] Add support for MercureBundle ^0.6 Oct 8, 2026
| Q              | A
| -------------- | ---
| Bug fix?       | no
| New feature?   | yes
| Deprecations?  | no
| Documentation? | yes
| Issues         |
| License        | MIT

MercureBundle 0.6 makes the Mercure protocol 1.0 the default, and a protocol 1.0 subscriber passes its topics in the `match` query parameter instead of `topic`. The Notify Stimulus controller only knew `topic`, so on a hub left on that default it subscribed to nothing.

`stream_notifications()` now renders the hub's protocol as a Stimulus controller value, and the controller builds its `EventSource` URLs with `match` on the protocol 1.0. A hub on the protocol 0.x renders no such value and keeps `topic`, so existing markup is unaffected.

The two test apps now pin `protocol_version: 0.x`, which is what their hub actually speaks.
@Kocal
Kocal force-pushed the claude/mercurebundle-0-6-support-bbeb01 branch from ddba479 to 8dc87e6 Compare October 8, 2026 15:12
@Kocal
Kocal requested review from kbond and smnandre October 8, 2026 15:26
@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels Oct 9, 2026
@Kocal
Kocal merged commit 262c26b into symfony:3.x Oct 9, 2026
37 checks passed
@Kocal
Kocal deleted the claude/mercurebundle-0-6-support-bbeb01 branch October 9, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation Feature New Feature Notify Status: Reviewed Has been reviewed by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants