{"id":20253273,"url":"https://github.com/becklyn/eventor-symfony","last_synced_at":"2026-04-15T23:33:26.574Z","repository":{"id":57805796,"uuid":"528002380","full_name":"Becklyn/eventor-symfony","owner":"Becklyn","description":"🔮 A minimalistic library for abstracting pub/sub operations (ported for Symfony)","archived":false,"fork":false,"pushed_at":"2022-09-20T08:13:33.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"3.x","last_synced_at":"2025-01-14T03:13:56.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/becklyn/eventor-symfony","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Becklyn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2022-08-23T13:25:40.000Z","updated_at":"2022-08-24T08:22:33.000Z","dependencies_parsed_at":"2022-08-23T21:01:22.371Z","dependency_job_id":null,"html_url":"https://github.com/Becklyn/eventor-symfony","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Becklyn%2Feventor-symfony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Becklyn%2Feventor-symfony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Becklyn%2Feventor-symfony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Becklyn%2Feventor-symfony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Becklyn","download_url":"https://codeload.github.com/Becklyn/eventor-symfony/tar.gz/refs/heads/3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241704442,"owners_count":20006374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T10:22:52.761Z","updated_at":"2026-04-15T23:33:26.523Z","avatar_url":"https://github.com/Becklyn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eventor-symfony\n\n🔮 A minimalistic library for abstracting pub/sub operations (ported for Symfony)\n\n\u0026rarr; *eventor* is [clerk](https://github.com/Becklyn/clerk) for pub/sub 😉\n\n\u0026rarr; the original Go implementation can be found [here](https://github.com/Becklyn/eventor)\n\n## Installation\n\n```sh\ncomposer require becklyn/eventor-symfony\n```\n\n## Supported brokers\n\n*eventor* has builtin support for the following brokers: \n\n- [Dapr Pub/sub API](https://docs.dapr.io/reference/api/pubsub_api/) - APIs for building portable and reliable microservices\n\n## Usage\n\nBeing a minimalistic library, *eventor* only provides you with the basics. The rest is up to your specific need.\n\n### Env variables\n\n```env\nDAPR_HOST=http://localhost:3500 # Default: (null)\nDAPR_PUBSUB=pubsubname # Default: (null)\n```\n\n### Publish\n\n```php\nclass Message\n{\n    public function __construct(\n        private readonly string $id,\n        private readonly string $body,\n    ) {}\n\n    public function id(): string\n    {\n        return $this-\u003eid;\n    }\n\n    public function body(): string\n    {\n        return $this-\u003ebody;\n    }\n}\n```\n\n```php\nclass PublishExample\n{\n    public function __construct(\n        private readonly Publisher $publisher,\n    ) {\n        $this-\u003epublisher-\u003epublish(\"topic\", new Message(\n            id: \"0\",\n            body: \"Hello World\",\n        ));\n    }\n}\n```\n\n### Subscribe\n\n```php\nclass DaprSubscriptionController extends AbstractController\n{\n    public function __construct(\n        private readonly DaprSubscriptionRegistry $subscriptionRegistry,\n    ) {\n        new On(\n            fn (Message $msg) =\u003e echo($msg),\n            $this-\u003e$subscriber,\n            \"topic\",\n        );\n    }\n\n    #[Route('/dapr/subscribe', methods: [Request::METHOD_GET])]\n    public function handleSubscribe() : Response\n    {\n        return $this-\u003esubscriptionRegistry-\u003ehandleSubscribe();\n    }\n\n    #[Route('/dapr/pubsubname/topic', methods: [Request::METHOD_POST])]\n    public function handleTopic(Request $request): Response\n    {\n        return $this-\u003esubscriptionRegistry-\u003ehandleTopic($request);\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecklyn%2Feventor-symfony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbecklyn%2Feventor-symfony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecklyn%2Feventor-symfony/lists"}