PHPackages                             floriangaerber/ably-php8 - 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. floriangaerber/ably-php8

AbandonedArchivedLibrary

floriangaerber/ably-php8
========================

Potentially unstable fork of ably/ably-php for PHP ^8.0

v1.1.4(5y ago)0661[1 PRs](https://github.com/floriangaerber/ably-php/pulls)Apache-2.0PHPPHP ^8.0

Since May 18Pushed 5y agoCompare

[ Source](https://github.com/floriangaerber/ably-php)[ Packagist](https://packagist.org/packages/floriangaerber/ably-php8)[ Docs](https://www.ably.io/)[ RSS](/packages/floriangaerber-ably-php8/feed)WikiDiscussions php8-package Synced today

READMEChangelog (2)Dependencies (1)Versions (20)Used By (0)

[Ably](https://www.ably.io)
===========================

[](#ably)

[![Latest Stable Version](https://camo.githubusercontent.com/ef3edb52f0cf1b5fb04dd956f3eaea9e9fd6e7f69d312b73e2246583d08b5d44/68747470733a2f2f706f7365722e707567782e6f72672f61626c792f61626c792d7068702f762f737461626c65)](https://packagist.org/packages/ably/ably-php)[![Total Downloads](https://camo.githubusercontent.com/c052dc2ff7e04801f9c0c58d40ce720f6c083d342ccf130c00a687bb90387724/68747470733a2f2f706f7365722e707567782e6f72672f61626c792f61626c792d7068702f646f776e6c6f616473)](https://packagist.org/packages/ably/ably-php)[![License](https://camo.githubusercontent.com/94a678ef5eaf67164271142a19f53335647a2616768b5d5669b85ab7e67a4916/68747470733a2f2f706f7365722e707567782e6f72672f61626c792f61626c792d7068702f6c6963656e7365)](https://packagist.org/packages/ably/ably-php)

A PHP REST client library for [www.ably.io](https://www.ably.io), the realtime messaging service. This library currently targets the [Ably 1.1 client library specification](https://www.ably.io/documentation/client-lib-development-guide/features/). You can jump to the '[Known Limitations](#known-limitations)' section to see the features this client library does not yet support or [view our client library SDKs feature support matrix](https://www.ably.io/download/sdk-feature-support-matrix) to see the list of all the available features.

Supported Platforms
-------------------

[](#supported-platforms)

This SDK supports PHP 5.6 and 7.0+

We regression-test the library against a selection of PHP versions (which will change over time, but usually consists of the versions that are supported upstream). Please refer to [.travis.yml](./.travis.yml) for the set of versions that currently undergo CI testing.

We'll happily support (and investigate reported problems with) any reasonably-widely-used PHP version. If you find any compatibility issues, please [do raise an issue](https://github.com/ably/ably-php/issues/new) in this repository or [contact Ably customer support](https://support.ably.io/) for advice.

Known Limitations
-----------------

[](#known-limitations)

Currently, this SDK only supports [Ably REST](https://www.ably.io/documentation/rest). However, you can use the [MQTT adapter](https://www.ably.io/documentation/mqtt) to implement [Ably's Realtime](https://www.ably.io/documentation/realtime) features using Python.

This SDK is *not compatible* with some of the Ably features:

Feature[Remember fallback host during failures](https://www.ably.io/documentation/realtime/usage#client-options)[MsgPack Binary Protocol](https://www.ably.io/documentation/realtime/usage#client-options)Documentation
-------------

[](#documentation)

Visit  for a complete API reference and more examples.

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

[](#installation)

### Via composer

[](#via-composer)

The client library is available as a [composer package on packagist](https://packagist.org/packages/ably/ably-php). If you don't have composer already installed, you can get it from .

Install Ably from the shell with:

```
$ composer require ably/ably-php --update-no-dev

```

Then simply require composer's autoloader:

```
require_once __DIR__ . '/vendor/autoload.php';
```

### Manual installation

[](#manual-installation)

Clone or download Ably from this repo and require `ably-loader.php`:

```
require_once __DIR__ . '/ably-php/ably-loader.php';
```

Using the REST API
------------------

[](#using-the-rest-api)

### Introduction

[](#introduction)

All examples assume a client and/or channel has been created as follows:

```
$client = new Ably\AblyRest('your.appkey:xxxxxx');
$channel = $client->channel('test');
```

### Publishing a message to a channel

[](#publishing-a-message-to-a-channel)

```
$channel->publish('myEvent', 'Hello!'); // => true
```

### Querying the History

[](#querying-the-history)

```
$messagesPage = $channel->history(); // => \Ably\Models\PaginatedResult
$messagesPage->items[0]; // => \Ably\Models\Message
$messagesPage->items[0]->data; // payload for the message
$messagesPage->next(); // retrieves the next page => \Ably\Models\PaginatedResult
$messagesPage->hasNext(); // false, there are no more pages
```

### Presence on a channel

[](#presence-on-a-channel)

```
$membersPage = $channel->presence->get(); // => \Ably\Models\PaginatedResult
$membersPage->items[0]; // first member present in this page => \Ably\Models\PresenceMessage
$membersPage->items[0]->clientId; // client ID of first member present
$membersPage->next(); // retrieves the next page => \Ably\Models\PaginatedResult
$membersPage->hasNext(); // false, there are no more pages
```

### Querying the Presence History

[](#querying-the-presence-history)

```
$presencePage = $channel->presence->history(); // => \Ably\Models\PaginatedResult
$presencePage->items[0]; // => \Ably\Models\PresenceMessage
$presencePage->items[0]->clientId; // client ID of first member
$presencePage->next(); // retrieves the next page => \Ably\Models\PaginatedResult
```

### Generate Token and Token Request

[](#generate-token-and-token-request)

```
$tokenDetails = $client->auth->requestToken();
// => \Ably\Models\PresenceMessage
$tokenDetails->token; // => "xVLyHw.CLchevH3hF....MDh9ZC_Q"

$client = new Ably\AblyRest( $tokenDetails->token );
// or
$client = new Ably\AblyRest( array( 'tokenDetails' => $tokenDetails ) );

$token = $client->auth->createTokenRequest();
// => {"id" => ...,
//     "clientId" => null,
//     "ttl" => 3600,
//     "timestamp" => ...,
//     "capability" => "{\"*\":[\"*\"]}",
//     "nonce" => ...,
//     "mac" => ...}
```

### Fetching your application's stats

[](#fetching-your-applications-stats)

```
$statsPage = client->stats(); // => \Ably\Models\PaginatedResult
$statsPage->items[0]; // => \Ably\Models\Stats
$statsPage->next(); // retrieves the next page => \Ably\Models\PaginatedResult
```

### Fetching the Ably service time

[](#fetching-the-ably-service-time)

```
$client->time(); // in milliseconds => 1430313364993
```

Laravel
-------

[](#laravel)

If you're using Laravel, you may want to check out [ably-php-laravel](https://packagist.org/packages/ably/ably-php-laravel) wrapper, which is a wrapper with Laravel-specific helper classes.

Support, feedback and troubleshooting
-------------------------------------

[](#support-feedback-and-troubleshooting)

Please visit  for access to our knowledgebase and to ask for any assistance.

You can also view the [community reported Github issues](https://github.com/ably/ably-php/issues).

To see what has changed in recent versions of Bundler, see the [CHANGELOG](CHANGELOG.md).

Known limitations
-----------------

[](#known-limitations-1)

1. This client library requires PHP version 5.4 or greater
2. [msgpack](http://msgpack.org/) support is currently missing in PHP client library, as there is no stable PHP msgpack library available.

Running the tests
-----------------

[](#running-the-tests)

The client library uses the Ably sandbox environment to provision an app and run the tests against that app. In order to run the tests, you need to:

```
git clone https://github.com/ably/ably-php.git
cd ably-php
composer install
git submodule init
git submodule update
./vendor/bin/phpunit

```

Contributing
------------

[](#contributing)

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Ensure you have added suitable tests and the test suite is passing (run `vendor/bin/phpunit`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create a new Pull Request

Release Process
---------------

[](#release-process)

This library uses [semantic versioning](http://semver.org/). For each release, the following needs to be done:

- Update the version number in [src/AblyRest.php](./src/AblyRest.php)
- Run [`github_changelog_generator`](https://github.com/skywinder/Github-Changelog-Generator) to automate the update of the [CHANGELOG](./CHANGELOG.md). Once the `CHANGELOG` update has completed, manually change the `Unreleased` heading and link with the current version number such as `1.0.0`. Also ensure that the `Full Changelog` link points to the new version tag instead of the `HEAD`.
- Commit
- Add a tag and push to origin such as `git tag 1.0.0 && git push origin 1.0.0`
- Visit  and add release notes for the release including links to the changelog entry.
- Visit , log in to Packagist, and click the "Update" button.
- Remember to release an update for the [PHP Laravel library](https://github.com/ably/ably-php-laravel)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~173 days

Recently: every ~179 days

Total

13

Last Release

1927d ago

Major Versions

0.9.0 → 1.0.02017-03-07

PHP version history (3 changes)0.8.0PHP &gt;=5.4

1.1.0PHP ^5.6 || ^7.0

v1.1.4PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6360b49e9b762364099cb4860b96b5b2bd098cb86c0b503c436f3df6dbebce78?d=identicon)[floriangaerber](/maintainers/floriangaerber)

---

Top Contributors

[![bladeSk](https://avatars.githubusercontent.com/u/4263742?v=4)](https://github.com/bladeSk "bladeSk (122 commits)")[![caphun](https://avatars.githubusercontent.com/u/44370?v=4)](https://github.com/caphun "caphun (106 commits)")[![jdavid](https://avatars.githubusercontent.com/u/596769?v=4)](https://github.com/jdavid "jdavid (60 commits)")[![mattheworiordan](https://avatars.githubusercontent.com/u/43789?v=4)](https://github.com/mattheworiordan "mattheworiordan (23 commits)")[![floriangaerber](https://avatars.githubusercontent.com/u/17989118?v=4)](https://github.com/floriangaerber "floriangaerber (21 commits)")[![kouno](https://avatars.githubusercontent.com/u/209665?v=4)](https://github.com/kouno "kouno (10 commits)")[![funkyboy](https://avatars.githubusercontent.com/u/348355?v=4)](https://github.com/funkyboy "funkyboy (10 commits)")[![Srushtika](https://avatars.githubusercontent.com/u/5900152?v=4)](https://github.com/Srushtika "Srushtika (7 commits)")[![DamienHarper](https://avatars.githubusercontent.com/u/2448660?v=4)](https://github.com/DamienHarper "DamienHarper (4 commits)")[![Quezler](https://avatars.githubusercontent.com/u/3179271?v=4)](https://github.com/Quezler "Quezler (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/floriangaerber-ably-php8/health.svg)

```
[![Health](https://phpackages.com/badges/floriangaerber-ably-php8/health.svg)](https://phpackages.com/packages/floriangaerber-ably-php8)
```

PHPackages © 2026

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