declare(strict_types=1); namespace App\EventSubscriber; use App\Event\; use PhpQml\Bridge\PublisherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * Republishes on `app://event/`. * Auto-generated alongside the event class — wire `payload` to whatever * shape you want QML clients to receive in the envelope's `data` field. */ final readonly class implements EventSubscriberInterface { public function __construct( private PublisherInterface $publisher, ) { } public static function getSubscribedEvents(): array { return [ ::class => '', ]; } public function ( $event): void { $this->publisher->publish('app://event/', [ 'op' => 'event', 'data' => $event->payload, ]); } }