PHPackages                             magdv/mattermost - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. magdv/mattermost

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

magdv/mattermost
================

Library to send messages with Mattermost Webhook

0.0.3(1y ago)01.6k↓50%MITPHPPHP &gt;=8.0

Since Jul 2Pushed 1y ago2 watchersCompare

[ Source](https://github.com/magdv/mattermost)[ Packagist](https://packagist.org/packages/magdv/mattermost)[ RSS](/packages/magdv-mattermost/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (8)Versions (6)Used By (0)

Client to work with Matermost webhook
-------------------------------------

[](#client-to-work-with-matermost-webhook)

This library will help you send messages to Mattermost by Webhook.

Installation / Usage
--------------------

[](#installation--usage)

Install the latest version via [composer](https://getcomposer.org/):

```
composer require magdv/mattermost
```

Here is an example of usage.
----------------------------

[](#here-is-an-example-of-usage)

```
        use MagDv\Mattermost\Attachment;
        use MagDv\Mattermost\Message;
        use MagDv\Mattermost\WebhookClient;
        use MagDv\Mattermost\WebhookParams;
        use GuzzleHttp\Client;

        // Any PSR7 Client
        $psr7Client = new Client();
        $client = new WebhookClient(
        $psr7Client,
        'http://matermost/hooks/2222222222',
        'tester'
        );

        $attachment = (new Attachment())->setFallback('This is the fallback test for the attachment.')
            ->setSuccessColor()
            ->setPretext('This is optional pretext that shows above the attachment.')
            ->setText('This is the text. **Finaly!** :let_me_in: ');

        // you can add array of attachments
        $message = new Message();
        $message->setText('Testing Mattermost client')
            ->setAttachments([$attachment])
            ->setChannel('town-square');

        $client->send($message);
        // or
        $client->batchSend([$message]);
```

If you need to send huge text, more than 4000 symbols, you can use

```
    $messages = MessageHelper::createMessagesWithTextAttachments(
    'channelName'
    'huge text, longer 4000 symbols'
    );
    $client->batchSend(...$messages);
```

It will create Message\[\], which you can send. It will break text by pages and qoute it by ``` So you just send it and it will print at chat one after another.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

684d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c7be182b031a590a466a7e993ef5fe82737ea6c95d7210c5f857fa1cdba5ab0?d=identicon)[denis-korolev](/maintainers/denis-korolev)

![](https://www.gravatar.com/avatar/44694b98f5d6cef0da13dec37e3bc422db04e3dc3d13b75de41c0cd22c3b795d?d=identicon)[magdv](/maintainers/magdv)

---

Top Contributors

[![denis-korolev](https://avatars.githubusercontent.com/u/9027091?v=4)](https://github.com/denis-korolev "denis-korolev (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/magdv-mattermost/health.svg)

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

###  Alternatives

[w7corp/easywechat

微信SDK

10.4k761.6k60](/packages/w7corp-easywechat)[aimeos/aimeos-base

Aimeos base layer for abstracting from host environments

2.1k134.0k1](/packages/aimeos-aimeos-base)[roach-php/core

A complete web scraping toolkit for PHP

1.5k352.4k3](/packages/roach-php-core)[tigitz/php-spellchecker

Provides an easy way to spellcheck multiple text source by many spellcheckers, directly from PHP

309498.4k1](/packages/tigitz-php-spellchecker)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

73142.3k25](/packages/jaxon-php-jaxon-core)

PHPackages © 2026

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