Download the PHP package raneomik/nette-mercure without Composer
On this page you can find all versions of the php package raneomik/nette-mercure. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download raneomik/nette-mercure
More information about raneomik/nette-mercure
Files in raneomik/nette-mercure
Download raneomik/nette-mercure
More information about raneomik/nette-mercure
Files in raneomik/nette-mercure
Vendor raneomik
Package nette-mercure
Short Description 🚀 Nette Mercure Extension: nette wrapper around https://github.com/symfony/mercure
License MIT
Homepage https://github.com/raneomik/nette-mercure
Package nette-mercure
Short Description 🚀 Nette Mercure Extension: nette wrapper around https://github.com/symfony/mercure
License MIT
Homepage https://github.com/raneomik/nette-mercure
Please rate this library. Is it a good library?
Informations about the package nette-mercure
Nette Mercure Extension
Work In Progress
🚀 Nette Mercure Extension: wrapper for symfony/mercure to use
Mercure in
Nette.
Mercure is a protocol allowing to push data updates to web browsers and other HTTP clients in a convenient, fast, reliable and battery-efficient way. It is especially useful to publish real-time updates of resources served through web APIs, to reactive web and mobile apps.
Requirements
- PHP 8.3 or newer
nette/di3.2,nette/http3.4 or newer- A Mercure hub: the one built in
FrankenPHP, or a
standalone one
- Optional:
| Package | For |
|---|---|
latte/latte |
templates in broadcasts, {mercure()} and {mercureJWTToken()} |
nette/application |
subscriber, authorization and discovery services |
tracy/tracy |
debug panel |
Getting started
Register the extension and configure the hub:
Publish:
Subscribe:
Documentation
- How-to guides
- Generate the signing key
- Configure several hubs
- Broadcast a template
- Send a private update
- Subscribe with a JWT, the cookie or discovery
- Broadcast Turbo Streams
- Use links and helpers in broadcast templates
- Use FrankenPHP hot reload
- Reference: configuration, PHP services, Latte functions
- Debugging: Tracy panel, debug bus
How it works
- The hub implementation is picked at runtime: the FrankenPHP built-in hub when
mercure_publish()exists (Symfony\Component\Mercure\FrankenPhpHub), HTTP tourlotherwise (Symfony\Component\Mercure\Hub). The same compiled container works in FrankenPHP workers and in CLI commands, as long asurlis reachable from the CLI. - A publication is rendered once and sent as is to every subscriber of the topic.
Development
Resources
- Based on symfony/mercure / documentation
Mercure
FrankenPHP Real-time and Hot-Reload
Nette,
Latte,
Tester,
Tracy
Infection & home-made Tester adapter
- Demo: nette-frankenphp, a multiplayer game with a live lobby, Turbo Streams and Web Push
Known issues
- The
anonymousoption of Mercure in the Caddy configuration seems to work only withSymfony\Component\Mercure\FrankenPhpHuband the FrankenPHP built-inmercure_publishfunction. HttpClient shows errors such as "405 Method Not Allowed" in this case.
License
MIT
All versions of nette-mercure with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.3
lcobucci/jwt Version ^5.6
nette/di Version ^3.2
nette/http Version ^3.4
nette/schema Version ^1.4
symfony/mercure Version ^0.9
web-token/jwt-library Version ^4.2
lcobucci/jwt Version ^5.6
nette/di Version ^3.2
nette/http Version ^3.4
nette/schema Version ^1.4
symfony/mercure Version ^0.9
web-token/jwt-library Version ^4.2
The package raneomik/nette-mercure contains the following files
Loading the files please wait ...