PHPackages                             polem/slack-notifier - 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. polem/slack-notifier

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

polem/slack-notifier
====================

A simple slack wrapper

0.2.1(11y ago)5938.4k↓100%16[4 issues](https://github.com/polem/slack-notifier/issues)1MITPHP

Since Mar 29Pushed 10y ago5 watchersCompare

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

READMEChangelogDependencies (4)Versions (5)Used By (1)

Slack notifier
==============

[](#slack-notifier)

[![Build Status](https://camo.githubusercontent.com/850c3cc4c87c2d06e3939220f20c3b10928ad446c28cadb5320cd63956c410fe/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f706f6c656d2f736c61636b2d6e6f7469666965722e706e67)](http://travis-ci.org/polem/slack-notifier)[![Code Coverage](https://camo.githubusercontent.com/15c0556c8343154629ac984e173e74e0087275e731222a4a6b11b5702280f1c4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706f6c656d2f736c61636b2d6e6f7469666965722f6261646765732f636f7665726167652e706e673f733d31663730356233623231356539316433623831643565386564363261633961663436643438333863)](https://scrutinizer-ci.com/g/polem/slack-notifier/)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7f9b5ca740538c45664dad8c35283d5f064a2260913877bb320563ddd5d10aab/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706f6c656d2f736c61636b2d6e6f7469666965722f6261646765732f7175616c6974792d73636f72652e706e673f733d64633036646137373061316333363234326534313666623665636135636533303736363065366635)](https://scrutinizer-ci.com/g/polem/slack-notifier/)[![SensioLabsInsight](https://camo.githubusercontent.com/c9020e27664ce0f2aa022a32fa14610849744a0b3ab3211cfdc459c0ac94759a/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f34376263363735642d393435612d343436372d613366322d6436373962303030653134352f6d696e692e706e67)](https://insight.sensiolabs.com/projects/47bc675d-945a-4467-a3f2-d679b000e145)

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

[](#installation)

`composer require polem/slack-notifier`

Usage
-----

[](#usage)

### Simple

[](#simple)

```
require __DIR__ . '/vendor/autoload.php';

$client = new Slack\Client('your_team', 'your_token');
$slack = new Slack\Notifier($client);

$message = new Slack\Message\Message('Hello world');

$message->setChannel('#test')
    ->setMrkdwn(true)
    ->setIconEmoji(':ghost:')
    ->setUsername('slack-php');

$slack->notify($message);
```

### With attachments

[](#with-attachments)

```
require __DIR__ . '/vendor/autoload.php';

$client = new Slack\Client('your_team', 'your_token');
$slack = new Slack\Notifier($client);

$message = new Slack\Message\Message('Hello world');
$attachment = new Slack\Message\MessageAttachment();
$attachment
    ->setMrkdwnIn(array('pretext', 'text', 'fields'))
    ->setFallback('fallback text')
    ->setPretext('Pretext text')
    ->setAuthorName('Author Name')
    ->setAuthorLink('Author Link')
    ->setAuthorIcon('Author Icon')
    ->setTitle('Title')
    ->setTitleLink('http://github.com')
    ->setImageUrl('http://github.com/image.jpg');
$field = new Slack\Message\MessageField();
$field
    ->setTitle('foo')
    ->setValue('bar');

$attachment->addField($field);
$message->addAttachment($attachment);

$message->setChannel('#test')
    ->setIconEmoji(':ghost:')
    ->setUsername('slack-php');

$slack->notify($message);
```

### Message

[](#message)

If your message contain @username and you want him to be notified, add `$message->enableLinkNames(true)`

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.2% 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 ~82 days

Total

3

Last Release

4260d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d444ecab52ec8712e306979ceba2be619b19114723651b30dd73d10b6c28c1f?d=identicon)[polem](/maintainers/polem)

---

Top Contributors

[![polem](https://avatars.githubusercontent.com/u/379985?v=4)](https://github.com/polem "polem (28 commits)")[![KalebClark](https://avatars.githubusercontent.com/u/4360202?v=4)](https://github.com/KalebClark "KalebClark (8 commits)")[![iGusev](https://avatars.githubusercontent.com/u/1555767?v=4)](https://github.com/iGusev "iGusev (5 commits)")[![T1l3](https://avatars.githubusercontent.com/u/1226419?v=4)](https://github.com/T1l3 "T1l3 (2 commits)")[![bt](https://avatars.githubusercontent.com/u/1100843?v=4)](https://github.com/bt "bt (1 commits)")[![cossou](https://avatars.githubusercontent.com/u/1337112?v=4)](https://github.com/cossou "cossou (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/polem-slack-notifier/health.svg)

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

###  Alternatives

[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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