Download the PHP package jul6art/push-bundle without Composer
On this page you can find all versions of the php package jul6art/push-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jul6art/push-bundle
More information about jul6art/push-bundle
Files in jul6art/push-bundle
Package push-bundle
Short Description Symfony real-time notification bundle
License MIT
Homepage https://github.com/jul6art/push-bundle
Informations about the package push-bundle
jul6art/push-bundle
Symfony real-time notification bundle
:warning: Work in progress so keep calm. The good news: this is maintained!
Requirements
- php ^7.4 || ^8.0
- symfony ^4.4 || ^5.0
- mercure
Installation
Then Download the mercure hub depending on your operating system and install it in the root of your project. For each release, the assets section list operating systems implementations. The folder must contain the mercure bin. Rename this folder mercure.
EventSource Polyfill
and import it on client side to make push works on IE and Edge
Generate new JWT token (Optionnal)
Go to jwt.io and put your future mercure secret key (default it's !ChangeMe!) in the verify signature textarea and this array in the payload textarea
Because the array is empty, the Symfony app will only be authorized to publish public updates (see the authorization section of symfony/mercure-bundle for further information).
THen store the generated token in your .env file as MERCURE_JWT_TOKEN parameter
Start mercure server
The default token is signed with the secret key: !ChangeMe!
CORS_ALLOWED_ORIGINS is the client URL and port. It can be * or a list of domains ADDR is the server url and 3000 is the port for mercure server
:warning: By default, push messages are async so you need to launch a crawler in a terminal to dequeue messages and send it
Using with api-platform
Server side
Client side
Using without api-platform
Server side
Sync (Optionnal)
Other messenger messages (Optionnal)
Can be async_priority_high or async_priority_low or sync
Asyncable Annotation (Optionnal)
My Entity
My EntityEvent
All actions in listeners who listen these event class consts will be async
You can also specify which doctrine events you want to track
Available events are
- postLoad
- postPersist
- postUpdate
- preRemove
License
The Push Bundle is open-sourced software licensed under the MIT license.
© 2023 dev in the hood
All versions of push-bundle with dependencies
jul6art/core-bundle Version ^1.0
symfony/config Version ^4.4 || ^5.0
symfony/dependency-injection Version ^4.4 || ^5.0
symfony/mercure-bundle Version *
symfony/messenger Version ^4.4 || ^5.0
symfony/http-kernel Version ^4.4 || ^5.0