Download the PHP package stijnhau/push-bundle without Composer

On this page you can find all versions of the php package stijnhau/push-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package push-bundle

stijnhau/push-bundle

Web Push (browser notifications) for Symfony apps, shared by CityWars, Crime-Life and F1Manager. It stores which browsers each user subscribed, sends with VAPID through minishlink/web-push, forgets browsers the push service says are gone, and can send from a Messenger worker. What triggers a notification, and whether a user wants it, stays in the app.

Piece What it does
Model\AbstractPushSubscription Doctrine mapped superclass: user, endpoint (unique), p256dh key, auth token, created at. renew() when a browser subscribes again.
Service\PushSubscriptions subscribe() (validates the endpoint: https, a known push service), unsubscribe(), forget(), forUser(), subscribedUserIds().
Service\PushSender send() to every browser of a user now, queue() through Messenger (or now, without it). Best-effort: never throws because of a push service.
PushMessage title, body, url, tag: the JSON payload, already translated.
Transport\WebPushTransport Off while a VAPID setting is empty. Refuses private/loopback addresses (NoPrivateNetworkHttpClient).
Test\InMemoryPushTransport For app tests: records instead of sending. InMemoryPushTransport::install(static::getContainer()).
Endpoint POST the browser's PushSubscription.toJSON(), DELETE {"endpoint"}; logged-in user, CSRF token in a header.
/sw.js The service worker: shows the notification, a click focuses or opens the page (same site only).
@stijnhau/push-bundle/push.js Client module (AssetMapper): sync(), enable(), disable(), current(), configFrom(). No UI.
stijnhau:push:generate-vapid-keys Prints a fresh key pair.
Twig push_public_key() ('' when off), push_enabled().

Install

Then run bin/console make:migration. With messenger_transport set the bundle routes Stijnhau\PushBundle\Messenger\SendPush to that transport.

Routes:

Sending

Browser

Add it to importmap.php as '@stijnhau/push-bundle/push.js' => ['path' => '@stijnhau/push-bundle/push.js']. An app with its own API can pass save: (method, body) => ... instead of url.

License

MIT, see LICENSE.


All versions of push-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
doctrine/doctrine-bundle Version ^3.4
doctrine/orm Version ^3.8
guzzlehttp/psr7 Version ^2.7 || ^3.0
minishlink/web-push Version ^11.0
psr/clock Version ^1.0
psr/log Version ^3.0
symfony/clock Version ^8.1
symfony/config Version ^8.1
symfony/dependency-injection Version ^8.1
symfony/framework-bundle Version ^8.1
symfony/http-client Version ^8.1
symfony/http-kernel Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package stijnhau/push-bundle contains the following files

Loading the files please wait ...