Symfony Bundle around the WebPush library

Installs: 201 653

Dependents: 2

Suggesters: 0

Security: 0

Stars: 44

Watchers: 3

Forks: 9

Open Issues: 5


v6.0.4 2024-02-12 09:38 UTC

This package is auto-updated.

Last update: 2024-02-12 09:40:15 UTC


This bundle provides a simple integration of the WebPush library.



Web Push sends notifications to endpoints which server delivers web push notifications as described in the Web Push API specification.

/** @var \Minishlink\WebPush\WebPush */
$webPush = $this->container->get('minishlink_web_push');

The bundle provides a new minishlink_web_push service that returns an instance of Minishlink\WebPush\WebPush.

For more info on what you can do with $webPush, check Minishlink/web-push.


  1. composer require minishlink/web-push-bundle
  2. Enable the bundle in your app/AppKernel.php.
// app/AppKernel.php

public function registerBundles()
    $bundles = array(
        // ...
        new Minishlink\Bundle\WebPushBundle\MinishlinkWebPushBundle(),
        // ...


Here is the default configuration, you may change it in your app/config/config.yml.

    subject: # can be an URL or a mailto:
    publicKey: ~88 chars          # uncompressed public key P-256 encoded in Base64-URL
    privateKey: ~44 chars         # the secret multiplier of the private key encoded in Base64-URL
    pemFile: path/to/pem          # if you have a PEM file and can link to it on your filesystem
    pem: pemFileContent           # if you have a PEM file and want to hardcode its content
  ttl: 2419200                    # Time to Live of notifications in seconds
  urgency: ~                      # can be very-low / low / normal / high
  topic: ~                        # default identifier for your notifications
  timeout: 30                     # Timeout of each request in seconds
  automatic_padding: true         # pad messages automatically for better security (against more bandwith usage)