Weave Code
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

Eventor Symfony Laravel Package

becklyn/eventor-symfony

Minimal pub/sub abstraction for Symfony, with built-in support for Dapr’s Pub/Sub API. Configure via env vars and publish typed messages to topics, then register handlers and expose simple subscription and topic endpoints through a controller/registry.

View on GitHub
Deep Wiki
Context7

eventor-symfony

🔮 A minimalistic library for abstracting pub/sub operations (ported for Symfony)

eventor is clerk for pub/sub 😉

→ the original Go implementation can be found here

Installation

composer require becklyn/eventor-symfony

Supported brokers

eventor has builtin support for the following brokers:

Usage

Being a minimalistic library, eventor only provides you with the basics. The rest is up to your specific need.

Env variables

DAPR_HOST=http://localhost:3500 # Default: (null)
DAPR_PUBSUB=pubsubname # Default: (null)

Publish

class Message
{
    public function __construct(
        private readonly string $id,
        private readonly string $body,
    ) {}

    public function id(): string
    {
        return $this->id;
    }

    public function body(): string
    {
        return $this->body;
    }
}
class PublishExample
{
    public function __construct(
        private readonly Publisher $publisher,
    ) {
        $this->publisher->publish("topic", new Message(
            id: "0",
            body: "Hello World",
        ));
    }
}

Subscribe

class DaprSubscriptionController extends AbstractController
{
    public function __construct(
        private readonly DaprSubscriptionRegistry $subscriptionRegistry,
    ) {
        new On(
            fn (Message $msg) => echo($msg),
            $this->$subscriber,
            "topic",
        );
    }

    #[Route('/dapr/subscribe', methods: [Request::METHOD_GET])]
    public function handleSubscribe() : Response
    {
        return $this->subscriptionRegistry->handleSubscribe();
    }

    #[Route('/dapr/pubsubname/topic', methods: [Request::METHOD_POST])]
    public function handleTopic(Request $request): Response
    {
        return $this->subscriptionRegistry->handleTopic($request);
    }
}
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.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle