PHPackages                             coolin/slack-messenger - 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. coolin/slack-messenger

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

coolin/slack-messenger
======================

Library for logging erros and sending messages to Slack

1.0.1(6y ago)025.2kMITPHPPHP &gt;=7.1

Since Dec 13Pushed 6y ago3 watchersCompare

[ Source](https://github.com/coolin-cz/slackMessenger)[ Packagist](https://packagist.org/packages/coolin/slack-messenger)[ RSS](/packages/coolin-slack-messenger/feed)WikiDiscussions master Synced 1mo ago

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

Slack Messenger
===============

[](#slack-messenger)

[![Latest Version](https://camo.githubusercontent.com/38b2d9b73494df8e5e51543559d36f6c8e371115971cba7c79bb4491c2542770/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6f6c696e2f736c61636b2d6d657373656e6765722e737667)](https://packagist.org/packages/coolin/slack-messenger)[![Issues](https://camo.githubusercontent.com/56ea2001d6ee4db52f245bc4190a86217c3ba3d75288b4428bfcfc8eba82d72c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f636f6f6c696e2d637a2f736c61636b4d657373656e6765722e737667)](https://github.com/coolin/slackMessenger/issues)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/coolin/slackMessenger/blob/master/LICENSE)

This Nette extension package allows you to log your errors and send messages to Slack.

Instalation
-----------

[](#instalation)

- **Download**

`composer require coolin/slack-messenger`

- **Registration**

```
extensions:
	slackMessenger: Coolin\SlackMessenger\SlackExtension
```

- **Minimal configuration**

```
slackMessenger:
	hook: 'YOUR_SLACK_WEBHOOK'
	channel: '#general'
```

Configuration
-------------

[](#configuration)

Package contains two services. Messenger and Logger. Both of them can be configured by global settings or, they can have specific configuration. If you use global and specific settings at once, specific setings will be always used.

```
slackMessenger:
    hook: 'YOUR_SLACK_WEBHOOK'
    channel: '#globalChannel'
    timeout: 30
    name: 'Slack Bot'
    title: 'globalTitle'
    color: 'globalColor'
    icon: 'globalIcon'
    messenger:
        enable: true
        channel: '#messengerChannel'
        name: 'Slack Bot'
        title: 'messengerTitle'
        color: 'messengerColor'
        icon: 'messengerIcon'
    logger:
        enable: false
        channel: '#loggerChannel'
        name: 'Slack Bot'
        title: 'loggerTitle'
        color: 'loggerColor'
        icon: 'loggerIcon'
```

Messenger
---------

[](#messenger)

for sending messages from aplication you have to inject Messenger first. You can do in only if you have enabled Messenger in `config.neon`

```
  /** @var \Coolin\SlackMessenger\Messenger @inject*/
  public $slack;

  public function send(){
    //variant 1
    $this->slack->send('Your Message');

    //variant 2
    $message = new \Coolin\SlackMessenger\Message();
    $message->setChannel('#general');
    $message->setName('Awesome Bot');
    $message->setText('I\'m alive!');

    $this->slack->sendMessage($message);
    $this->slack->sendMessage($message, null, self::ALT_SLACK_HOOK); // ignore Slack hook from config and use specific one
  }
```

In both variants, if you omit some setting, default setting from `config.neon` will be used instead.

Formatting
----------

[](#formatting)

Class `Coolin\SlackMessenger\Formater` contains basic functions for text formatting.

```
$message->setText('Normal text ' . Formatter::bold('bold text'));
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 84% 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 ~361 days

Total

4

Last Release

2356d ago

Major Versions

0.9.1 → 1.0.02019-07-22

### Community

Maintainers

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

---

Top Contributors

[![krekos](https://avatars.githubusercontent.com/u/1011578?v=4)](https://github.com/krekos "krekos (21 commits)")[![JanHrivnak](https://avatars.githubusercontent.com/u/3205027?v=4)](https://github.com/JanHrivnak "JanHrivnak (4 commits)")

---

Tags

loggingslackmessaging

### Embed Badge

![Health badge](/badges/coolin-slack-messenger/health.svg)

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

###  Alternatives

[saasscaleup/laravel-log-alarm

Laravel log Alarm help you to set up alarm when errors occur in your system and send you a notification via Slack and email

27025.0k](/packages/saasscaleup-laravel-log-alarm)[simonbackx/slack-php-webhook

Post messages to your Slack channels with this easy to use library.

41837.3k2](/packages/simonbackx-slack-php-webhook)[kdyby/monolog

Integration of Monolog into Nette Framework

33684.0k10](/packages/kdyby-monolog)

PHPackages © 2026

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