PHPackages                             zyfmix/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. zyfmix/xmpp

ActiveLibrary

zyfmix/xmpp
===========

Library for XMPP protocol (Jabber) connections

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

Since Jan 23Pushed 10y ago1 watchersCompare

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

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

fabiang/xmpp
============

[](#fabiangxmpp)

[![Latest Stable Version](https://camo.githubusercontent.com/92cd680a8f1b97c34c7ddad4fd1bf000d90c37c6c1c6fc3b92cb46d3cc4bb54d/68747470733a2f2f706f7365722e707567782e6f72672f66616269616e672f786d70702f762f737461626c652e737667)](https://packagist.org/packages/fabiang/xmpp) [![Total Downloads](https://camo.githubusercontent.com/81230c9654e699f7ce6fdfaa5261ef06fcf54f12e7df33dd2f58984ec80a575d/68747470733a2f2f706f7365722e707567782e6f72672f66616269616e672f786d70702f646f776e6c6f6164732e737667)](https://packagist.org/packages/fabiang/xmpp) [![Latest Unstable Version](https://camo.githubusercontent.com/bc8bca57ec078ceb12b40925f93aaad572ed88e944eb61a731dd92195269c351/68747470733a2f2f706f7365722e707567782e6f72672f66616269616e672f786d70702f762f756e737461626c652e737667)](https://packagist.org/packages/fabiang/xmpp) [![License](https://camo.githubusercontent.com/f4bbebfd3e2e8e6c1443a12db529c86528afac5133cfc2987c328ecabb2f454d/68747470733a2f2f706f7365722e707567782e6f72672f66616269616e672f786d70702f6c6963656e73652e737667)](https://packagist.org/packages/fabiang/xmpp)
[![Build Status](https://camo.githubusercontent.com/a4b6560a64b8744ee48b2802b0ed6e82e9e79bb9197c6ba6c3a920c431758aee/68747470733a2f2f7472617669732d63692e6f72672f66616269616e672f786d70702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/fabiang/xmpp) [![Scrutinizer Quality Score](https://camo.githubusercontent.com/6b8a232b00a2c8c3d1c2c66bbb2e5618f19efe1c98ee27ab7e1a406d981d818c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66616269616e672f786d70702f6261646765732f7175616c6974792d73636f72652e706e673f733d32363035616432626339383766663835303162386637343961646466663433656331616337303938)](https://scrutinizer-ci.com/g/fabiang/xmpp/) [![Coverage Status](https://camo.githubusercontent.com/a88d38d41e171e693ef9f75dd93444908131e362cda577f9ab40c72eef2257bb/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f66616269616e672f786d70702e737667)](https://coveralls.io/r/fabiang/xmpp?branch=master) [![Dependency Status](https://camo.githubusercontent.com/b64e95826f0e36e7aad9b6163402f976ff22603996637bb6afba340131f948a5/68747470733a2f2f67656d6e617369756d2e636f6d2f66616269616e672f786d70702e706e67)](https://gemnasium.com/fabiang/xmpp) [![SensioLabsInsight](https://camo.githubusercontent.com/ff2b5be7a37c1e22784fe5328c0a4b6fa15eae4fc92acc23dc2c4633e80858af/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f61353335636438322d373838642d343530362d383033652d3032656465343461396537342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/a535cd82-788d-4506-803e-02ede44a9e74)

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": {
        "fabiang/xmpp": "*"
    }
}
```

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

[](#documentation)

This library uses an object to hold options:

```
use Fabiang\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 Fabiang\Xmpp\Client;
$client = new Client($options);
// optional connect manually
$client->connect();
```

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

```
use Fabiang\Xmpp\Protocol\Roster;
use Fabiang\Xmpp\Protocol\Presence;
use Fabiang\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
- Add support von vCard
- improve documentation

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.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

4195d 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/3f0aba6c63ec888d68f1ade723c265d8180cd2ffb157e176c1f5864bd88576f1?d=identicon)[coam](/maintainers/coam)

---

Top Contributors

[![fabiang](https://avatars.githubusercontent.com/u/348344?v=4)](https://github.com/fabiang "fabiang (134 commits)")[![n10ty](https://avatars.githubusercontent.com/u/2970001?v=4)](https://github.com/n10ty "n10ty (2 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/zyfmix-xmpp/health.svg)

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

###  Alternatives

[norgul/xmpp-php

PHP library for XMPP.

4611.3k1](/packages/norgul-xmpp-php)[zorn-v/xmpp

Library for XMPP protocol (Jabber) connections

118.5k](/packages/zorn-v-xmpp)[gamenet/php-jabber-rpc

PHP wrapper for ejabberd xml-rpc module

1921.0k](/packages/gamenet-php-jabber-rpc)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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