PHPackages                             smart-freedom/yii2-slack - 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. smart-freedom/yii2-slack

ActiveExtension

smart-freedom/yii2-slack
========================

Yii2 slack client

v1.0.2(6y ago)054PHPPHP &gt;=5.4.0

Since Jun 19Pushed 6y agoCompare

[ Source](https://github.com/SmartFreedom/yii2-slack)[ Packagist](https://packagist.org/packages/smart-freedom/yii2-slack)[ RSS](/packages/smart-freedom-yii2-slack/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (2)Versions (15)Used By (0)

Yii2 Slack integration
======================

[](#yii2-slack-integration)

Designed to send messages to slack messenger

[![How it looks](https://camo.githubusercontent.com/c40f34de3a2e40abf85c7a5be33a97d13b8983775ff0e59d8faebadf7f55c130/687474703a2f2f646e2e696d6167792e6d652f3230313630322f31352f31326437646165313062666239366331353966343839303164353138653139362e706e67)](https://camo.githubusercontent.com/c40f34de3a2e40abf85c7a5be33a97d13b8983775ff0e59d8faebadf7f55c130/687474703a2f2f646e2e696d6167792e6d652f3230313630322f31352f31326437646165313062666239366331353966343839303164353138653139362e706e67)

Installation
------------

[](#installation)

```
php composer.phar require understeam/yii2-slack:~0.3 --prefer-dist
```

Also, you should configure [incoming webhook](https://api.slack.com/incoming-webhooks) inside your Slack team.

Usage
-----

[](#usage)

First of all, configure [yiisoft/yii2-httpclient](https://github.com/yiisoft/yii2-httpclient) component:

```
...
    'components' => [
        'httpclient' => [
            'class' => 'yii\httpclient\Client',
        ],
    ],
...
```

Also you can set it up only inside of slack client:

```
...
    'components' => [
        'slack' => [
            'httpclient' => [
                'class' => 'yii\httpclient\Client',
            ],
            ...
        ],
    ],
...
```

Configure component:

```
...
    'components' => [
        'slack' => [
            'class' => 'SmartFreedom\Slack\Client',
            'url' => '',
            'username' => 'My awesome application',
        ],
    ],
...
```

Now you can send messages right into slack channel via next command:

```
Yii::$app->slack->send('Hello', ':thumbs_up:', [
    [
        // attachment object
        'text' => 'text of attachment',
        'pretext' => 'pretext here',
    ],
]);
```

To learn more about attachments, [read Slack documentation](https://api.slack.com/incoming-webhooks)

Also you can use slack as a log target:

```
...
'components' => [
    'log' => [
        'traceLevel' => 3,
        'targets' => [
            [
                'class' => 'SmartFreedom\Slack\LogTarget',
                'categories' => ['commandBus'],
                'exportInterval' => 1, // Send logs on every message
                'logVars' => [],
            ],
        ],
    ],
],
...
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~145 days

Recently: every ~0 days

Total

13

Last Release

2242d ago

Major Versions

v0.3.2 → v1.0.02020-03-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/a165039084a1606ebf16e28f22ef12ba31f336f3ee97491136cf004e93bd924c?d=identicon)[sabrsmart](/maintainers/sabrsmart)

---

Top Contributors

[![AnatolyRugalev](https://avatars.githubusercontent.com/u/1397674?v=4)](https://github.com/AnatolyRugalev "AnatolyRugalev (20 commits)")[![sabrsmart](https://avatars.githubusercontent.com/u/61594180?v=4)](https://github.com/sabrsmart "sabrsmart (4 commits)")

### Embed Badge

![Health badge](/badges/smart-freedom-yii2-slack/health.svg)

```
[![Health](https://phpackages.com/badges/smart-freedom-yii2-slack/health.svg)](https://phpackages.com/packages/smart-freedom-yii2-slack)
```

###  Alternatives

[tuyakhov/yii2-notifications

The extension provides support for sending notifications across a variety of delivery channels, including mail, SMS, Slack etc. Notifications may also be stored in a database so they may be displayed in your web interface.

6735.5k2](/packages/tuyakhov-yii2-notifications)[zhuravljov/yii2-rest

Yii2 REST Client

1186.2k](/packages/zhuravljov-yii2-rest)[hprose/hprose-yii

Hprose Server for Yii 2

357.1k](/packages/hprose-hprose-yii)

PHPackages © 2026

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