PHPackages                             oktopost/tattler-php - 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. oktopost/tattler-php

ActiveLibrary

oktopost/tattler-php
====================

PHP Tattler client

1.0.11(7y ago)088MITPHPPHP &gt;=7.1-stable

Since Oct 22Pushed 1y ago14 watchersCompare

[ Source](https://github.com/Oktopost/Tattler-php)[ Packagist](https://packagist.org/packages/oktopost/tattler-php)[ RSS](/packages/oktopost-tattler-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (23)Used By (0)

Tattler PHP client
==================

[](#tattler-php-client)

[![Build Status](https://camo.githubusercontent.com/c9593ac2f498ed110ab4d3493e3c705cf959571e632b4dda55852001a2cce5f5/68747470733a2f2f7472617669732d63692e6f72672f4f6b746f706f73742f546174746c65722d7068702e737667)](https://travis-ci.org/Oktopost/Tattler-php)[![Coverage Status](https://camo.githubusercontent.com/0b8646554a109c1a25010868ddc8a211e34608656c3f73d70b0d12c32ac8bc96/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4f6b746f706f73742f546174746c65722d7068702f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Oktopost/Tattler-php?branch=master)[![License MIT](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](https://github.com/Oktopost/Tattler-php/blob/master/LICENSE)

Send async messages to your users using [Tattler](https://github.com/grohman/tattler)

- [Simple example project](https://github.com/grohman/tattler-php-chat-example)

Installation
------------

[](#installation)

```
$ composer require oktopost/tattler-php
```

Or add to `composer.json`:

```
"require": {
    "oktopost/tattler-php": "^1.0"
}
```

and then run `composer update`.

Setup
-----

[](#setup)

```
$config = new TattlerConfig();
$tattlerConfig->fromArray([
        'WsAddress'         => 'TATTLER_WEBSOCKET_ADDRESS',
        'ApiAddress'        => 'TATTLER_API_ADDRESS',
        'Namespace'         => 'YOUR APPLICATION_NAME',
        'Secret'            => 'TATTLER_SECRET',
        'TokenTTL'          => 'USER_TOKEN_TTL',
        'DBConnector'       => new RedisConnector(),
        'NetworkConnector'  => new CurlConnector()
]);

/** @var ITattlerModule::class $tattler */
$tattler = Tattler::getInstance($tattlerConfig);
```

*note: for using redis db connector you need to install [predis](https://github.com/nrk/predis)*

- TATTLER\_WEBSOCKET\_ADDRESS - websocket transport address e.g. ws://websocket.domain.tld:80 or wss://websocket.domain.tld:443
- TATTLER\_API\_ADDRESS - api address e.g.  or
- YOUR APPLICATION\_NAME - namespace for your application. You can use same tattler server with multiple applications.
- TATTLER\_SECRET - same secret that was defined in tattler-server configuration
- USER\_TOKEN\_TTL - time in seconds for users auth tokens used with tattler-server

Then create TattlerController available from your website. See example in [DummyControllerExample](https://github.com/Oktopost/Tattler-php/blob/master/controller/DummyControllerExample.php)
*note: all methods from that controller should response with JSON body*

When php configuration is done, include [js/tattler.min.js](js/tattler.min.js) to your html and initialize tattler

```
window.tattler = TattlerFactory.create();
```

Usage
-----

[](#usage)

Setup listener in your js code

```
window.tattler.addHandler('myMessage', 'globalNamespace', function(data){
	alert(data.message);
});
```

Send payload to all users from php

```
/** var ITattlerMessage::class $message */
$message = new TattlerMessage();
$message->setHandler('myMessage')->setNamespace('globalNamespace')->setPayload(['message' => 'Hello world']]);

$tattler->message($message)->broadcast()->say();
```

See more docs in [docs/](docs/README.md)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~31 days

Recently: every ~94 days

Total

22

Last Release

2827d ago

PHP version history (2 changes)v1.0PHP &gt;=5.6-stable

1.0.6.4PHP &gt;=7.1-stable

### Community

Maintainers

![](https://www.gravatar.com/avatar/20dd11f9cfc13b0c4521787a143ea9ae3990e0458d712273fdf6c8a3529ca5d0?d=identicon)[alexey-pkv](/maintainers/alexey-pkv)

![](https://www.gravatar.com/avatar/adcdc5c3ae46971efb23e533e494d8c7e86dd4d9d15d63651ab4ae2a4a6bd6e0?d=identicon)[grohman](/maintainers/grohman)

---

Top Contributors

[![grohman](https://avatars.githubusercontent.com/u/1030260?v=4)](https://github.com/grohman "grohman (100 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/oktopost-tattler-php/health.svg)

```
[![Health](https://phpackages.com/badges/oktopost-tattler-php/health.svg)](https://phpackages.com/packages/oktopost-tattler-php)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M672](/packages/laravel-socialite)[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[packbackbooks/lti-1p3-tool

A library used for building IMS-certified LTI 1.3 tool providers in PHP.

51438.3k2](/packages/packbackbooks-lti-1p3-tool)[vemcogroup/laravel-weather

Weather package for Laravel to use different providers to get weather info

5525.0k](/packages/vemcogroup-laravel-weather)[jimtools/jwt-auth

PSR-15 JWT Authentication middleware, A replacement for tuupola/slim-jwt-auth

20142.3k3](/packages/jimtools-jwt-auth)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

2369.5k3](/packages/kinde-oss-kinde-auth-php)

PHPackages © 2026

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