PHPackages                             webtoolsnz/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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. webtoolsnz/yii2-slack

ActiveYii2-extension[Logging &amp; Monitoring](/categories/logging)

webtoolsnz/yii2-slack
=====================

Slack Integration for Yii LogTargets

0.1.3(9y ago)29.6kproprietaryPHP

Since Jul 12Pushed 5y ago15 watchersCompare

[ Source](https://github.com/webtoolsnz/yii2-slack)[ Packagist](https://packagist.org/packages/webtoolsnz/yii2-slack)[ Docs](https://github.com/webtoolsnz/yii2-slack)[ RSS](/packages/webtoolsnz-yii2-slack/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

Slack LogTarget for Yii2
========================

[](#slack-logtarget-for-yii2)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f4a76a7ddf0662c16e42dd43f0a7b9906d0d226cdfef3b368c96fc66b5ebede9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776562746f6f6c736e7a2f796969322d736c61636b2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/webtoolsnz/yii2-slack/?branch=master)

Provides a Yii2 LogTarget implementation for slack incoming webhooks.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

`composer require webtoolsnz/yii2-slack`

Configuration Example
---------------------

[](#configuration-example)

You will need to [create an incoming webhook](https://my.slack.com/services/new/incoming-webhook) and configure the `webHookUrl` setting appropriately.

```
...
'components' => [
        'log' => [
            'targets' => [
                [
                    'class' => 'webtoolsnz\slack\SlackTarget',
                    'levels' => ['error', 'warning'],
                    'webHookUrl' => 'https://your.webhook.url',
                    'except' => [
                        'yii\web\HttpException:404',
                        'yii\web\HttpException:403',
                    ],
                ],
            ],
        ],
    ],
...

```

Settings
--------

[](#settings)

Besides the the properties inherited from [\\yii\\log\\Target](http://www.yiiframework.com/doc-2.0/yii-log-target.html) the following settings are also supported

- `webHookUrl`: The generated URL for your incoming webhook
    - string
    - **required**
- `channel`: the channel that messages will be sent to
    - string
    - default: the setting on the webhook
- `username`: the username that messages will be sent from
    - string
    - default: Will be generated based on server name or application name (depending if web or console application)
- `icon`: the icon messages will be sent with, either :emoji: or a URL to an image
    - string
    - default: `:warning:`
- `color`: the color of the message attachment, can be one of `good`, `warning`, `danger` or any hex color code.
    - string
    - default: `danger`
- `showFullContext`: if set to true all of the usual context variables will be included in the attachment
    - bool
    - default: `false`

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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 ~337 days

Total

3

Last Release

3331d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fe4edc8748b6ac4922ab8d16f64de61ad0b552027d8c1630646f6a0d6f09b9d?d=identicon)[badams](/maintainers/badams)

![](https://avatars.githubusercontent.com/u/57298?v=4)[bruce aldridge](/maintainers/brucealdridge)[@brucealdridge](https://github.com/brucealdridge)

![](https://avatars.githubusercontent.com/u/3345508?v=4)[Jonathan Guo](/maintainers/JonathanGuo)[@JonathanGuo](https://github.com/JonathanGuo)

![](https://avatars.githubusercontent.com/u/12756120?v=4)[webtools-machine-user](/maintainers/webtools-machine-user)[@webtools-machine-user](https://github.com/webtools-machine-user)

---

Top Contributors

[![badams](https://avatars.githubusercontent.com/u/340715?v=4)](https://github.com/badams "badams (5 commits)")

---

Tags

slackyii2component

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M154](/packages/spatie-laravel-health)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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