LogoLogo
3.1.x
3.1.x
  • Web-Push
  • Requirements
  • Fluent Syntax
  • Contributing
  • License
  • Common Concepts
    • Overview
    • The Subscription
    • The Notification
    • The Status Report
    • VAPID
  • The Library
    • Installation
    • The Extension Manager
    • The Web Push Service
  • The Symfony Bundle
    • Installation
    • Configuration
    • The Web Push Service
    • Doctrine
    • Example
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. The Symfony Bundle

Installation

PreviousThe Web Push ServiceNextConfiguration

Was this helpful?

The bundle can be installed using the package spomky-labs/web-push-bundle

composer require spomky-labs/web-push-bundle

If you use Symfony Flex, the bundle is ready to be used. Otherwise, you must enable it. The bundle class is WebPush\Bundle\WebPushBundle.

When done, the bundle is ready and can send the notifications. However, there are extra packages we highly recommend to install and set up.

VAPID Header

The authenticates your server and prevent malicious application to send notifications to your users. The header contains a signed JSON Web Token (JWS).

The library provides bridges for the following libraries web-token and lcobucci/jwt.

Please install web-token/jwt-signature-algorithm-ecdsa or lcobucci/jwt depending on the library you want to use.

It is possible to use any other JWS provider. This will be detailed in the future.

VAPID header