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

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

montefuscolo/xmpp
=================

Library for XMPP protocol (Jabber) connections

0.8(9mo ago)0169.2k↑21.7%1BSD-2-ClausePHPPHP ^8.1

Since Jan 31Pushed 9mo agoCompare

[ Source](https://github.com/fabiomontefuscolo/xmpp)[ Packagist](https://packagist.org/packages/montefuscolo/xmpp)[ Docs](https://github.com/fabiang/xmpp)[ RSS](/packages/montefuscolo-xmpp/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (7)Versions (13)Used By (0)

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

[](#fabiangxmpp)

Library for XMPP protocol connections (Jabber) for PHP.

[![License](https://camo.githubusercontent.com/f4bbebfd3e2e8e6c1443a12db529c86528afac5133cfc2987c328ecabb2f454d/68747470733a2f2f706f7365722e707567782e6f72672f66616269616e672f786d70702f6c6963656e73652e737667)](https://packagist.org/packages/fabiang/xmpp)[![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)[![Dependency Status](https://camo.githubusercontent.com/4f3da5d42512944359fab089b50c7c60130971006543e6cc6423d065c012d789/68747470733a2f2f67656d6e617369756d2e636f6d2f66616269616e672f786d70702e737667)](https://gemnasium.com/fabiang/xmpp)[![Build Status](https://camo.githubusercontent.com/a4b6560a64b8744ee48b2802b0ed6e82e9e79bb9197c6ba6c3a920c431758aee/68747470733a2f2f7472617669732d63692e6f72672f66616269616e672f786d70702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/fabiang/xmpp)[![Coverage Status](https://camo.githubusercontent.com/a88d38d41e171e693ef9f75dd93444908131e362cda577f9ab40c72eef2257bb/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f66616269616e672f786d70702e737667)](https://coveralls.io/r/fabiang/xmpp?branch=master)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/6b8a232b00a2c8c3d1c2c66bbb2e5618f19efe1c98ee27ab7e1a406d981d818c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f66616269616e672f786d70702f6261646765732f7175616c6974792d73636f72652e706e673f733d32363035616432626339383766663835303162386637343961646466663433656331616337303938)](https://scrutinizer-ci.com/g/fabiang/xmpp/)[![SensioLabsInsight](https://camo.githubusercontent.com/ff2b5be7a37c1e22784fe5328c0a4b6fa15eae4fc92acc23dc2c4633e80858af/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f61353335636438322d373838642d343530362d383033652d3032656465343461396537342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/a535cd82-788d-4506-803e-02ede44a9e74)

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

[](#system-requirements)

- PHP minimum 5.6 or minimum 7.0
- psr/log
- (optional) psr/log-implementation - like monolog/monolog for logging

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

[](#installation)

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

```
composer 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')
    ->setPassword('channelpassword')
    ->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

```

After that:

```
./vendor/bin/phpunit
./vendor/bin/behat

```

New features should always 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

47

—

FairBetter than 93% of packages

Maintenance57

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 88.4% 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 ~272 days

Recently: every ~612 days

Total

10

Last Release

280d ago

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

0.5.0PHP &gt;=5.3.3

0.7.0PHP ^5.6 || ^7.0

0.8PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ab8e6dfdca1e0fd7c30361c5a524b840c9b821751bcd6603365df997ae262a1?d=identicon)[montefuscolo](/maintainers/montefuscolo)

---

Top Contributors

[![fabiang](https://avatars.githubusercontent.com/u/348344?v=4)](https://github.com/fabiang "fabiang (153 commits)")[![fabiomontefuscolo](https://avatars.githubusercontent.com/u/162023?v=4)](https://github.com/fabiomontefuscolo "fabiomontefuscolo (10 commits)")[![n10ty](https://avatars.githubusercontent.com/u/2970001?v=4)](https://github.com/n10ty "n10ty (2 commits)")[![Ghitu](https://avatars.githubusercontent.com/u/7511010?v=4)](https://github.com/Ghitu "Ghitu (1 commits)")[![iivannov](https://avatars.githubusercontent.com/u/7932620?v=4)](https://github.com/iivannov "iivannov (1 commits)")[![marclaporte](https://avatars.githubusercontent.com/u/1004261?v=4)](https://github.com/marclaporte "marclaporte (1 commits)")[![Olivier-Kango](https://avatars.githubusercontent.com/u/108806646?v=4)](https://github.com/Olivier-Kango "Olivier-Kango (1 commits)")[![alexalouit](https://avatars.githubusercontent.com/u/1419377?v=4)](https://github.com/alexalouit "alexalouit (1 commits)")[![pirxthepilot](https://avatars.githubusercontent.com/u/7690118?v=4)](https://github.com/pirxthepilot "pirxthepilot (1 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/montefuscolo-xmpp/health.svg)

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

###  Alternatives

[symfony/http-kernel

Provides a structured process for converting a Request into a Response

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

Provides powerful methods to fetch HTTP resources synchronously or asynchronously

2.1k330.1M4.5k](/packages/symfony-http-client)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[api-platform/metadata

API Resource-oriented metadata attributes and factories

244.5M180](/packages/api-platform-metadata)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

10139.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)
