2017 © Pedro Peláez
 

library webpush-bundle

Symfony Bundle: Associate your users to webpush subscriptions.

image

bentools/webpush-bundle

Symfony Bundle: Associate your users to webpush subscriptions.

  • Monday, June 4, 2018
  • by bpolaszek
  • Repository
  • 1 Watchers
  • 5 Stars
  • 567 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 10 Versions
  • 248 % Grown

The README.md

Latest Stable Version License CI Total Downloads, (*1)

Webpush Bundle

This bundle allows your app to leverage the Web Push protocol to send notifications to your users' devices, whether they're online or not., (*2)

With a small amount of code, you'll be able to associate your Symfony users to WebPush Subscriptions:, (*3)

  • A single user can subscribe from multiple browsers/devices
  • Multiple users can subscribe from a single browser/device

This bundle uses your own persistence system (Doctrine or anything else) to manage these associations., (*4)

We assume you have a minimum knowledge of how Push Notifications work, otherwise we highly recommend you to read Matt Gaunt's Web Push Book., (*5)

Example Use cases, (*6)

  • You have a todolist app - notify users they're assigned a task
  • You have an eCommerce app:
    • Notify your customer their order has been shipped
    • Notify your category manager they sell a product

Summary

  1. Installation
  2. The UserSubscription entity
  3. The UserSubscription manager
  4. Configure the bundle
  5. Enjoy!
  6. F.A.Q.

Getting started

This bundle is just the back-end part of the subscription process. For the front-end part, have a look at the webpush-client package., (*7)

Composer is your friend:

PHP8.1+ is required., (*8)

composer require bentools/webpush-bundle

⚠️ We aren't on stable version yet - expect some changes., (*9)

Generate your VAPID keys:

php bin/console webpush:generate:keys

You'll have to update your config with the given keys. We encourage you to store them in environment variables or in parameters.yml., (*10)

Next: Create your UserSubscription class, (*11)

Tests

./vendor/bin/phpunit, (*12)

License

MIT, (*13)

Credits

This bundle leverages the minishlink/web-push library., (*14)

The Versions

04/06 2018

dev-master

9999999-dev

Symfony Bundle: Associate your users to webpush subscriptions.

  Sources   Download

MIT

The Requires

 

The Development Requires

04/06 2018

0.3.3

0.3.3.0

Symfony Bundle: Associate your users to webpush subscriptions.

  Sources   Download

MIT

The Requires

 

The Development Requires

24/01 2018

0.3.2

0.3.2.0

Symfony Bundle: Associate your users to webpush subscriptions.

  Sources   Download

MIT

The Requires

 

The Development Requires

24/01 2018

dev-symfonyflex

dev-symfonyflex

Symfony Bundle: Associate your users to webpush subscriptions.

  Sources   Download

MIT

The Requires

 

The Development Requires

18/01 2018

0.3.1

0.3.1.0

Symfony Bundle: Associate your users to webpush subscriptions.

  Sources   Download

MIT

The Requires

 

The Development Requires

06/01 2018

dev-fix-2

dev-fix-2

Symfony Bundle: Associate your users to webpush subscriptions.

  Sources   Download

MIT

The Requires

 

The Development Requires

05/01 2018

0.3

0.3.0.0

Symfony Bundle: Associate your users to webpush subscriptions.

  Sources   Download

MIT

The Requires

 

The Development Requires

20/12 2017

0.2.1

0.2.1.0

Symfony Bundle: Associate your users to webpush subscriptions.

  Sources   Download

MIT

The Requires

 

The Development Requires

27/11 2017

0.2

0.2.0.0

Symfony Bundle: Associate your users to webpush subscriptions.

  Sources   Download

MIT

The Requires

 

The Development Requires

22/11 2017

0.1

0.1.0.0

Symfony Bundle: Associate your users to webpush subscriptions.

  Sources   Download

MIT

The Requires

 

The Development Requires