endroid/pusher-bundle

This package is abandoned and no longer maintained. The author suggests using the pusher/pusher-php-server package instead.

Endroid Pusher Bundle for Symfony

2.0.0 2018-01-01 22:11 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:55:14 UTC


README

By endroid

Latest Stable Version Build Status Total Downloads Monthly Downloads License

This bundle enables easy integration of real-time features provided by Pusher.

knpbundles.com

Requirements

Installation

Use Composer to install the bundle.

$ composer require endroid/pusher-bundle

Then enable the bundle via the kernel.

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = [
        // ...
        new Endroid\PusherBundle\EndroidPusherBundle(),
    ];
}

Configuration

config.yml

endroid_pusher:
    app_id: ...
    key: ...
    secret: ...

Usage

<?php

$pusher = $container->get('endroid_pusher.pusher');
$pusher->trigger('my_channel', 'my_event', ['message' => 'my_message']);

The service returns the Pusher object as defined by the Pusher PHP Library.

Versioning

Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility breaking changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.

License

This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.