First to Site
Release 3.7

Mercure + ux-notify Removal

Retiring unused real-time notification infrastructure (-1,518 lines)

Overview

Mercure was installed in March 2023 as infrastructure for real-time notifications and wired into NotificationService in January 2024 ("add real-time notification"). No Mercure hub was ever deployed on any FTS environment - platform/preprod/candidate:8000 all return connection failure. Every $hub->publish() call has been silently failing for 16 months, caught by a try/catch that swallows the exception. The client-side EventSource subscription was also commented out. This release removes the entire stack cleanly.

No user-visible change. 1,518 fewer lines of code. One less phantom dependency.

What Changed

Packages Removed

  • symfony/mercure-bundle
  • symfony/ux-notify (depends on mercure-bundle; was itself unused in source)
  • Transitively removed: symfony/mercure, symfony/mercure-notifier, lcobucci/jwt

Bundle Registrations

  • MercureBundle and NotifyBundle removed from app/config/bundles.php and ordering/config/bundles.php.

Config & Env

  • app/config/packages/mercure.yaml + ordering/config/packages/mercure.yaml deleted.
  • mercure_public_url parameter removed from both services.yaml files.
  • MERCURE_URL, MERCURE_PUBLIC_URL, MERCURE_JWT_SECRET removed from all .env and .env.local files.
  • Also removed Symfony/ux-notify and mercure-turbo-stream entries from controllers.json.

Code

  • NotificationService constructor no longer takes HubInterface or ParameterBagInterface.
  • Removed methods: getNotificationPublicUrl, publishNotification, runNotifications, runOneNotification, setReadNotification (the last had pre-existing bugs and no callers).
  • Removed runRealTimeNotification endpoint from NotificationController (both apps).
  • jsConfiguration endpoint simplified: now returns just notification_url, not public_url.
  • DashboardController and NotificationManager callers updated.
  • Dead notification_public_url template variable and hidden <div> removed from dashboard twigs.

JavaScript

  • public_url removed from autocomplete / notification localStorage cache in custom-ea.js.
  • initializeRealtimeNotificationEvent() function signature dropped its unused publicUrl argument.
  • ~60 lines of commented-out EventSource.onmessage handler and the commented-out $.get('/api/notification/run-realtime-notification') call removed.

Retained

  • Notification entity, CRUD controllers, DB persistence.
  • Notification dropdown UI (driven by notificationUrl() only, DB-backed).
  • jsConfiguration endpoint (frontend still uses it for the "View all messages" link).

Why the Removal Was Safe

  • Mercure hub never deployed, so no realtime subscribers ever received anything.
  • try/catch around $hub->publish() swallowed every failure silently.
  • EventSource subscription commented out client-side.
  • Notification list + dropdown use DB polling and continue to work.

Stats

  • 29 files changed
  • +146 / −1,518 lines

Changelog Reference

  • refactor: remove unused Mercure + ux-notify dependencies (PR #800, 3953210)
  • chore(deps): regenerate bun.lock after Mercure removal (a0947ebba)