{"id":13617449,"url":"https://github.com/symfony/mercure","last_synced_at":"2025-05-15T08:00:21.914Z","repository":{"id":33199955,"uuid":"154309062","full_name":"symfony/mercure","owner":"symfony","description":"The Mercure Component allows to easily push updates to web browsers and other HTTP clients using the Mercure protocol.","archived":false,"fork":false,"pushed_at":"2024-04-08T12:52:42.000Z","size":131,"stargazers_count":419,"open_issues_count":11,"forks_count":41,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-14T13:06:40.477Z","etag":null,"topics":["live-updates","mercure","php","server-sent-events","subscriptions","symfony"],"latest_commit_sha":null,"homepage":"https://symfony.com/doc/current/components/mercure.html","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/symfony.png","metadata":{"funding":{"github":"fabpot","tidelift":"packagist/symfony/symfony","custom":"https://symfony.com/sponsor"},"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-23T10:30:45.000Z","updated_at":"2025-03-05T09:35:33.000Z","dependencies_parsed_at":"2023-11-29T08:28:50.752Z","dependency_job_id":"f1ebfa0e-f0f7-4c48-9d6f-2be392c9fa28","html_url":"https://github.com/symfony/mercure","commit_stats":{"total_commits":73,"total_committers":22,"mean_commits":"3.3181818181818183","dds":0.6438356164383562,"last_synced_commit":"8eb2496e0249c4df95a632ce908773bef0b02493"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fmercure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fmercure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fmercure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfony%2Fmercure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/symfony","download_url":"https://codeload.github.com/symfony/mercure/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301420,"owners_count":22047901,"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":["live-updates","mercure","php","server-sent-events","subscriptions","symfony"],"created_at":"2024-08-01T20:01:41.863Z","updated_at":"2025-05-15T08:00:21.671Z","avatar_url":"https://github.com/symfony.png","language":"PHP","funding_links":["https://github.com/sponsors/fabpot","https://tidelift.com/funding/github/packagist/symfony/symfony","https://symfony.com/sponsor"],"categories":["PHP"],"sub_categories":[],"readme":"Mercure Component\n=================\n\n\u003e Mercure is a protocol allowing to push data updates to web browsers and other\n  HTTP clients in a convenient, fast, reliable and battery-efficient way.\n  It is especially useful to publish real-time updates of resources served through\n  web APIs, to reactive web and mobile apps.\n\nThe Mercure Component implements the \"publisher\" part of [the Mercure Protocol](https://mercure.rocks).\n\nGetting Started\n---------------\n\n```\n$ composer require symfony/mercure\n```\n\n```php\n// change these values accordingly to your hub installation\ndefine('HUB_URL', 'https://demo.mercure.rocks/.well-known/mercure');\ndefine('JWT', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InN1YnNjcmliZSI6WyJmb28iLCJiYXIiXSwicHVibGlzaCI6WyJmb28iXX19.LRLvirgONK13JgacQ_VbcjySbVhkSmHy3IznH3tA9PM');\n\nuse Symfony\\Component\\Mercure\\Hub;\nuse Symfony\\Component\\Mercure\\Jwt\\StaticTokenProvider;\nuse Symfony\\Component\\Mercure\\Update;\n\n$hub = new Hub(HUB_URL, new StaticTokenProvider(JWT));\n// Serialize the update, and dispatch it to the hub, that will broadcast it to the clients\n$id = $hub-\u003epublish(new Update('https://example.com/books/1.jsonld', 'Hi from Symfony!'));\n```\n\nResources\n---------\n\n* [Documentation](https://symfony.com/doc/current/mercure.html)\n* [Contributing](https://symfony.com/doc/current/contributing/index.html)\n* [Report issues](https://github.com/symfony/mercure/issues) and\n  [send Pull Requests](https://github.com/symfony/mercure/pulls)\n  in the [`symfony/mercure` repository](https://github.com/symfony/mercure)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymfony%2Fmercure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsymfony%2Fmercure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymfony%2Fmercure/lists"}