PHPackages                             mrad/notifications-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. mrad/notifications-bundle

ActiveSymfony-bundle[Mail &amp; Notifications](/categories/mail)

mrad/notifications-bundle
=========================

Implement notifications system in your symfony project using Pusher API

v1.3.0(7y ago)86.0k3MITPHPPHP &gt;=5.5.9

Since Mar 7Pushed 7y ago2 watchersCompare

[ Source](https://github.com/mradmrad/NotificationsBundle)[ Packagist](https://packagist.org/packages/mrad/notifications-bundle)[ RSS](/packages/mrad-notifications-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

NotificationsBundle
===================

[](#notificationsbundle)

A simple implementation for [Pusher](https://pusher.com/) API that helps you integrate a notifications system in a few simple steps.

Installation
============

[](#installation)

1. `composer require mrad/notifications-bundle`
2. Enable the bundle in AppKernel.php `new SBC\NotificationsBundle\NotificationsBundle(),`

Usage
=====

[](#usage)

### Step 1:

[](#step-1)

First thing you need to create an [account](https://pusher.com/signup) with **Pusher** and then in **Your apps** menu create a new app.

### Step 2:

[](#step-2)

Add you app configuration to the `app/config.yml`:

```
# NotificationsBundle configuration
notifications:
    app_id:     your_id
    app_key:    your_key
    app_secret: secret
    cluster:    cluster
    # Optional
    # Default false: work without ssl encryption
    # Set it to true to work with ssl encryption
    encrypted:  false

```

Of course you can find those details in your app in the dashboard.
[![alt text](Resources/docs/images/pusher_dashboard.png)](Resources/docs/images/pusher_dashboard.png)

### Step 3:

[](#step-3)

Now in your `view.html.twig` (your client side) add this:

```
{# Call NotificationsBundles's assets #}
{{ notifications_assets() }}

    /**
    * After calling notifications_assets() "pusher" is now available
    * and you can use it this way
    */

    // select the channel you want to listen to
    var channel = pusher.subscribe("notifications");// notifications channel
    channel.bind("my-event", function(data) {
        console.log('from notifications channel', data);
    });

    var channel = pusher.subscribe("messages");// messages channel
    channel.bind("my-event", function(data) {
        console.log('from messages channel', data);
    });

```

And that's it 😃, now to make sure that your client is receiving the data correctly you can test it by calling this console command:
`php bin/console notifications:trigger "Your message" "channel"`
If you open the browser's console you should see something like this:
[![alt text](Resources/docs/images/browser_console.png)](Resources/docs/images/browser_console.png)

### Broadcast custom messages from Backend

[](#broadcast-custom-messages-from-backend)

To broadcast messages from your backend you can simply do this:

```
// From your controller or service
$data = array(
    'my-message' => "My custom message",
);
$pusher = $this->get('mrad.pusher.notificaitons');
$channel = 'messages';
$pusher->trigger($data, $channel);

// or you can keep the channel pram empty and will be broadcasted on "notifications" channel by default
$pusher->trigger($data);
```

### Next Step

[](#next-step)

Now I will show how to create and save notifications in database.

- [Create and persist notifications](Resources/docs/NotificationExample.md)

### License

[](#license)

This project is under the [MIT license](LICENSE)

### Videos

[](#videos)

You can check this [playlist](https://www.youtube.com/watch?v=ajKTAfr1yVI&list=PLjv8CqUmMuKw9AsRL2dQH-JjQaFaIofL2) for more details about how This bundle works.

### Thanks

[](#thanks)

Thanks to [SlimenTN](https://github.com/SlimenTN) for his help in this project

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~64 days

Recently: every ~80 days

Total

6

Last Release

2717d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17425659?v=4)[Haithem Mrad](/maintainers/mradmrad)[@mradmrad](https://github.com/mradmrad)

---

Top Contributors

[![SlimenTN](https://avatars.githubusercontent.com/u/17424180?v=4)](https://github.com/SlimenTN "SlimenTN (12 commits)")[![mradmrad](https://avatars.githubusercontent.com/u/17425659?v=4)](https://github.com/mradmrad "mradmrad (3 commits)")

---

Tags

bundlenotificationsymfonypushersymfony notificationsnotificaiton bundle

### Embed Badge

![Health badge](/badges/mrad-notifications-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mrad-notifications-bundle/health.svg)](https://phpackages.com/packages/mrad-notifications-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M387](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[artdarek/pusherer

Pusher.com service provider for Laravel 4.

5089.2k](/packages/artdarek-pusherer)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
