PHPackages                             deepstreamhub/deepstream.io-client-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. [API Development](/categories/api)
4. /
5. deepstreamhub/deepstream.io-client-php

AbandonedArchivedLibrary[API Development](/categories/api)

deepstreamhub/deepstream.io-client-php
======================================

the php client for deepstreamHub

v1.0.1(8y ago)811.5k↓50%3[4 issues](https://github.com/deepstreamIO/deepstream.io-client-php/issues)Apache-2.0PHPPHP &gt;=5.3.0|^7.0

Since Jun 30Pushed 5y ago2 watchersCompare

[ Source](https://github.com/deepstreamIO/deepstream.io-client-php)[ Packagist](https://packagist.org/packages/deepstreamhub/deepstream.io-client-php)[ Docs](https://github.com/deepstreamIO/deepstream.io-client-php)[ RSS](/packages/deepstreamhub-deepstreamio-client-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

LOOKING FOR MAINTAINER
======================

[](#looking-for-maintainer)

This library is no longer being maintained by deepstream core. Looking for a maintainer we can transfer this to, or add contributor rights to.

deepstream.io-client-php
========================

[](#deepstreamio-client-php)

PHP Client using the dsh HTTP API

Installing &amp; running tests
==============================

[](#installing--running-tests)

Running the tests is a bit trickier as it requires a two-node deepstream cluster, consisting of a Websocket deepstream with a test-provider that answers RPCs and listens for events and a HTTP deepstream that the actual tests are run against:

[![Diagram](diagram.png)](diagram.png)

- Install PHP - you can get it from e.g.  for windows
- Add the folder with the executables (e.g. php.exe, php-cli.exe) to your path
- Download PHP Unit from
- Move the `phpunit-6.2.1.phar` file to your `deepstream.io-client-php` folder
- Make it executable via

```
chmod +x phpunit.phar
```

- Download a local version of Redis and run it on its default port
- Download the latest deepstream version and unzip it
- run `git clone git@github.com:deepstreamIO/dsx-connection-http.git` in its lib directory
- install the plugin via `yarn install`
- copy the configs in `ds-conf` into your deepstream's conf directory
- install the redis msg connector using `./deepstream.exe install msg redis`
- start two deepstream instances with

```
./deepstream.exe start -c conf/config-http.yml
```

and

```
./deepstream.exe start -c conf/config-ws.yml
```

- install the test provider in the `deepstream.io-client-php`

```
cd test-provider
yarn install
```

- run the test provider

```
node test-provider.js
```

- run the tests using

```
php phpunit-6.2.1.phar --bootstrap src\DeepstreamClient.php test\client-test.php

```

If it all works it looks like this [![Screenshot](screenshot.png)](screenshot.png)

API
---

[](#api)

### `new DeepstreamClient( $url, $authData )`

[](#new-deepstreamclient-url-authdata-)

Creates the deepstream client

```
$client = new DeepstreamClient( 'https://api.deepstreamhub.com/api/v1', array(
    'token' => 'xxxx-xxxx-xxxx-xxxx'
))
```

### `setRecord( $recordName, [$path], $data )`

[](#setrecord-recordname-path-data-)

Writes full or partial data to a record

```
    # Writing full data
    $client->setRecord( 'user/johndoe', array(
        'firstname' => 'John',
        'lastname' => 'Doe',
        'age' => 32,
        'pets' => array( 'hamster', 'cat' )
    ));

    # Writing partial data
    $client->setRecord( 'user/johndoe', 'age', '33' );
```

### `$client->getRecord( $recordName )`

[](#client-getrecord-recordname-)

Reads the data for a given record

```
    $firstname = $client->getRecord( 'user/johndoe' )->firstname;
```

### `$client->deleteRecord( $recordName )`

[](#client-deleterecord-recordname-)

Deletes a record

```
    $client->deleteRecord( 'user/johndoe' );
```

### `$client->getRecordVersion( $recordName )`

[](#client-getrecordversion-recordname-)

Retrieves the current version of a record

```
    $version = $client->getRecordVersion( 'user/johndoe' );
```

### `$client->makeRpc( $rpcName, [$data] )`

[](#client-makerpc-rpcname-data-)

Executes a Remote Procedure Call

```
    #with data
    $twentyfour = $client->makeRpc( 'multiply-by-two', 12 );

    #without data
    $client->makeRpc( 'logout' );
```

### `$client->emitEvent( $eventName, [$data] )`

[](#client-emitevent-eventname-data-)

Emits an event

```
    #with data
    $client->emitEvent( 'new-message', 'hey, what\'s up?' );

    #without data
    $client->emitEvent( 'ping' );
```

### `$client->startBatch()`

[](#client-startbatch)

Starts a set of batch operations that will be executed as a single request

### `$client->executeBatch()`

[](#client-executebatch)

Executes an existing set of batch operations

```
    $client->startBatch()
    $client->emitEvent( 'new-message', 'hey, what\'s up?' );
    $client->getRecord( 'user/johndoe' );
    $client->setRecord( 'user/mike', 'age', 12 );
    $client->executeBatch();
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~2 days

Total

2

Last Release

3242d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6194e1438215055b8d159c0a8f67d552f4e324dada2930e22ad0ed68ffa19b2b?d=identicon)[deepstreamhub](/maintainers/deepstreamhub)

---

Top Contributors

[![WolframHempel](https://avatars.githubusercontent.com/u/1503717?v=4)](https://github.com/WolframHempel "WolframHempel (9 commits)")[![MuriloFrade](https://avatars.githubusercontent.com/u/4869454?v=4)](https://github.com/MuriloFrade "MuriloFrade (2 commits)")[![yasserf](https://avatars.githubusercontent.com/u/2734923?v=4)](https://github.com/yasserf "yasserf (1 commits)")

---

Tags

rpcrealtimepubsubdatasync

### Embed Badge

![Health badge](/badges/deepstreamhub-deepstreamio-client-php/health.svg)

```
[![Health](https://phpackages.com/badges/deepstreamhub-deepstreamio-client-php/health.svg)](https://phpackages.com/packages/deepstreamhub-deepstreamio-client-php)
```

###  Alternatives

[apache/thrift

Apache Thrift RPC system

10.9k2.1M41](/packages/apache-thrift)[grpc/grpc

gRPC library for PHP

506116.6M180](/packages/grpc-grpc)[sajya/server

Easy implementation of the JSON-RPC 2.0 server for the Laravel framework.

2391.9M4](/packages/sajya-server)[lstrojny/fxmlrpc

Fast and tiny XML/RPC client with bridges for various HTTP clients

1425.4M30](/packages/lstrojny-fxmlrpc)[pubnub/pubnub

This is the official PubNub PHP SDK repository.

1314.6M17](/packages/pubnub-pubnub)[jsonrpc/jsonrpc

JSON-RPC 2.0 client/server implementation

53407.1k4](/packages/jsonrpc-jsonrpc)

PHPackages © 2026

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