PHPackages                             updivision/xmpp - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. updivision/xmpp

ActiveLibrary[HTTP &amp; Networking](/categories/http)

updivision/xmpp
===============

Library for XMPP protocol (Jabber) connections

0.6.1(11y ago)1171BSD-2-ClausePHPPHP &gt;=5.3.3

Since Jan 23Pushed 9y ago1 watchersCompare

[ Source](https://github.com/updivision/xmpp)[ Packagist](https://packagist.org/packages/updivision/xmpp)[ Docs](https://github.com/fabiang/xmpp)[ RSS](/packages/updivision-xmpp/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (5)Versions (9)Used By (0)

updivison/xmpp
==============

[](#updivisonxmpp)

[![Latest Stable Version](https://camo.githubusercontent.com/ccbd2b79cf1eb119cc7ac1f11488452416726b49f3ca2986f2ad1acf779fcfb4/68747470733a2f2f706f7365722e707567782e6f72672f75706469766973696f6e2f786d70702f762f737461626c65)](https://packagist.org/packages/updivision/xmpp) [![Total Downloads](https://camo.githubusercontent.com/b086cb2d32ecab3104394ec6c7f708bdf6f18cf972a94fed933024c67e42346f/68747470733a2f2f706f7365722e707567782e6f72672f75706469766973696f6e2f786d70702f646f776e6c6f616473)](https://packagist.org/packages/updivision/xmpp) [![Latest Unstable Version](https://camo.githubusercontent.com/e15791fc2ca382c30034b8322eac02e6141561897b5170d5f7fa2861bf70a86a/68747470733a2f2f706f7365722e707567782e6f72672f75706469766973696f6e2f786d70702f762f756e737461626c65)](https://packagist.org/packages/updivision/xmpp) [![License](https://camo.githubusercontent.com/883aff95c9098caab22f4c3fbf60944b3256a266277d0ced1f9b12d1e99c504d/68747470733a2f2f706f7365722e707567782e6f72672f75706469766973696f6e2f786d70702f6c6963656e7365)](https://packagist.org/packages/updivision/xmpp)[![Build Status](https://camo.githubusercontent.com/b1018dff3c858b6d8903435e9fefff6c7959b1e2cb0d43e3bf5668e505f05fb4/68747470733a2f2f7472617669732d63692e6f72672f75706469766973696f6e2f786d70702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/updivision/xmpp) [![Scrutinizer Quality Score](https://camo.githubusercontent.com/c6ea5cebf7e0d9ce6e8f51563ced20819105f4f4cb7d3523b7975575e4def194/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f75706469766973696f6e2f786d70702f6261646765732f7175616c6974792d73636f72652e706e673f733d32363035616432626339383766663835303162386637343961646466663433656331616337303938)](https://scrutinizer-ci.com/g/updivision/xmpp/) [![Coverage Status](https://camo.githubusercontent.com/8d9565eea44982050c3b41200a741a159efc25dd44881a168c8777eba25a7e63/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f75706469766973696f6e2f786d70702e737667)](https://coveralls.io/r/updivision/xmpp?branch=master) [![Dependency Status](https://camo.githubusercontent.com/1bdddcd43ab6f26f2341af658d696e60e584a24ad40f7c86326288fd99172344/68747470733a2f2f67656d6e617369756d2e636f6d2f75706469766973696f6e2f786d70702e706e67)](https://gemnasium.com/updivision/xmpp)

Library for XMPP protocol connections (Jabber) for PHP.

SYSTEM REQUIREMENTS
-------------------

[](#system-requirements)

- PHP &gt;= 5.3.3
- psr/log
- psr/log-implementation - like monolog/monolog for logging (optional)

INSTALLATION
------------

[](#installation)

New to Composer? Read the [introduction](https://getcomposer.org/doc/00-intro.md#introduction). Add the following to your composer file:

```
{
    "require": {
        "updivision/xmpp": "*"
    }
}
```

DOCUMENTATION
-------------

[](#documentation)

This library uses an object to hold options:

```
use Updivision\Xmpp\Options;
$options = new Options($address);
$options->setUsername($username)
    ->setPassword($password);
```

The server address must be in the format `tcp://myjabber.com:5222`. If the server supports TLS the connection will automatically be encrypted.

You can also pass a PSR-2-compatible object to the options object:

```
$options->setLogger($logger)
```

The client manages the connection to the Jabber server and requires the options object:

```
use Updivision\Xmpp\Client;
$client = new Client($options);
// optional connect manually
$client->connect();
```

For sending data you just need to pass a object that implements `Updivision\Xmpp\Protocol\ProtocolImplementationInterface`:

```
use Updivision\Xmpp\Protocol\Roster;
use Updivision\Xmpp\Protocol\Presence;
use Updivision\Xmpp\Protocol\Message;

// fetch roster list; users and their groups
$client->send(new Roster);
// set status to online
$client->send(new Presence);

// send a message to another user
$message = new Message;
$message->setMessage('test')
    ->setTo('nickname@myjabber.com')
$client->send($message);

// join a channel
$channel = new Presence;
$channel->setTo('channelname@conference.myjabber.com')
    ->setNickName('mynick');
$client->send($channel);

// send a message to the above channel
$message = new Message;
$message->setMessage('test')
    ->setTo('channelname@conference.myjabber.com')
    ->setType(Message::TYPE_GROUPCHAT);
$client->send($message);
```

After all you should disconnect:

```
$client->disconnect();
```

DEVELOPING
----------

[](#developing)

If you like this library and you want to contribute, make sure the unit-tests and integration tests are running. Composer will help you to install the right version of PHPUnit and [Behat](http://behat.org/).

```
composer install --dev

```

After that:

```
./vendor/bin/phpunit -c tests
./vendor/bin/behat --config=tests/behat.yml --strict

```

New features should allways tested with Behat.

LICENSE
-------

[](#license)

BSD-2-Clause. See the [LICENSE](LICENSE.md).

TODO
----

[](#todo)

- Better integration of channels
- Factory method for server addresses
- improve documentation

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.8% 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 ~50 days

Recently: every ~72 days

Total

7

Last Release

4241d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.3

0.5.0PHP &gt;=5.3.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/9735ac25103cc42c7caffcfd3f6ec23074800c711a73f25601f932bc4966f799?d=identicon)[alinupdivision](/maintainers/alinupdivision)

---

Top Contributors

[![fabiang](https://avatars.githubusercontent.com/u/348344?v=4)](https://github.com/fabiang "fabiang (135 commits)")[![Ghitu](https://avatars.githubusercontent.com/u/7511010?v=4)](https://github.com/Ghitu "Ghitu (5 commits)")[![n10ty](https://avatars.githubusercontent.com/u/2970001?v=4)](https://github.com/n10ty "n10ty (2 commits)")[![antonkomarev](https://avatars.githubusercontent.com/u/1849174?v=4)](https://github.com/antonkomarev "antonkomarev (1 commits)")[![frederikbosch](https://avatars.githubusercontent.com/u/1552577?v=4)](https://github.com/frederikbosch "frederikbosch (1 commits)")

---

Tags

xmppjabber

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/updivision-xmpp/health.svg)

```
[![Health](https://phpackages.com/badges/updivision-xmpp/health.svg)](https://phpackages.com/packages/updivision-xmpp)
```

###  Alternatives

[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k853.6M8.4k](/packages/symfony-http-kernel)[symfony/http-client

Provides powerful methods to fetch HTTP resources synchronously or asynchronously

2.0k338.8M4.6k](/packages/symfony-http-client)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.4k67.4M257](/packages/nelmio-api-doc-bundle)[api-platform/metadata

API Resource-oriented metadata attributes and factories

275.0M198](/packages/api-platform-metadata)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

10239.4k5](/packages/bitrix24-b24phpsdk)[mimmi20/browser-detector

Library to detect Browsers and Devices

48156.1k4](/packages/mimmi20-browser-detector)

PHPackages © 2026

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