PHPackages                             hybridlogic/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. [Queues &amp; Workers](/categories/queues)
4. /
5. hybridlogic/slack

ActiveLibrary[Queues &amp; Workers](/categories/queues)

hybridlogic/slack
=================

A library for working with Slack.

0.2.0(9y ago)3501[2 issues](https://github.com/Dachande663/PHP-Slack/issues)MITPHPPHP &gt;=5.5.0

Since Feb 23Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Dachande663/PHP-Slack)[ Packagist](https://packagist.org/packages/hybridlogic/slack)[ Docs](https://github.com/Dachande663/PHP-Slack)[ RSS](/packages/hybridlogic-slack/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

PHP Slack
=========

[](#php-slack)

A library of useful classes for working with Slack.

At the moment this library is mainly focused on [slash commands](https://api.slack.com/slash-commands) but may grow in the future. It supports defining multiple commands and matching actions within them.

[![Build Status](https://camo.githubusercontent.com/03a38a2892d037e838e6ed957a7e0460a9643133e285b06a0254fb4f2d60893e/68747470733a2f2f7472617669732d63692e6f72672f44616368616e64653636332f5048502d536c61636b2e706e67)](https://travis-ci.org/Dachande663/PHP-Slack) [![Packagist](https://camo.githubusercontent.com/f90d73c26dca58102955528e25a81d97959b879d06f6f3ca65483ef87b3c19de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6879627269646c6f6769632f736c61636b2e737667)](https://packagist.org/packages/hybridlogic/slack)

0.0 Table of Contents
---------------------

[](#00-table-of-contents)

1. Introduction
2. Install
3. Examples
4. Running Tests
5. Troubleshooting
6. Changelog

1.0 Introduction
----------------

[](#10-introduction)

Slack is a cross-platform messaging platform that offers multiple integrations with third-party services. One of the most useful of these integrations is in the form of [slash commands](https://api.slack.com/slash-commands) e.g.

```
/cinema movies tonight

```

Slash commands make a HTTP POST request to a server and display the result to the user. This library aims to make dealing with these commands a bit simpler, including:

- Parsing the incoming data
- Matching text against command patterns
- Ensuring security tokens match
- Filtering available teams, channels and users
- Serving responses
- Handling delayed responses

At the moment there is no support for the Slack Web API or RTM as these have been done elsewhere by others. This library lets you get a slash command online quickly and easily. Look in the examples directory for more info.

2.0 Installation
----------------

[](#20-installation)

PHP Slack is available on Composer via [Packagist](https://packagist.org/packages/hybridlogic/slack). To install simply run:

```
composer require hybridlogic/slack

```

Alternatively clone the git repository and use a PSR-4 compatible autoloader.

3.0 Examples
------------

[](#30-examples)

```
Slack::dispatcher()
	->setFilter(
		Slack::filter()
			->allowedTeamIds('T01234567')
			->allowedUserIds('U01234567')
	)
	->addCommand(
		Slack::command('ABCDEF01234567')
			->on('', function(){
				return Slack::response('Welcome to this command');
			})
			->on('^say (.+)$', function($req){
				$text = $req->param(0);
				return Slack::response("Hello $text");
			})
	)
	->dispatch(Slack::request())
	->serve()
;
```

4.0 Running Tests
-----------------

[](#40-running-tests)

phpunit tests

5.0 Troubleshooting
-------------------

[](#50-troubleshooting)

Make sure you meet the requirements for running a slash command host i.e. publicly accessible and served over HTTPS.

6.0 Changelog
-------------

[](#60-changelog)

- **\[2016-02-21\]** Initial release

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

3583d ago

### Community

Maintainers

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

---

Top Contributors

[![Dachande663](https://avatars.githubusercontent.com/u/106847?v=4)](https://github.com/Dachande663 "Dachande663 (8 commits)")

---

Tags

messageslackhybridlogic

### Embed Badge

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

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

###  Alternatives

[php-amqplib/php-amqplib

Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.

4.6k125.3M870](/packages/php-amqplib-php-amqplib)[php-amqplib/rabbitmq-bundle

Integrates php-amqplib with Symfony &amp; RabbitMq. Formerly emag-tech-labs/rabbitmq-bundle, oldsound/rabbitmq-bundle.

1.3k20.1M64](/packages/php-amqplib-rabbitmq-bundle)[bunny/bunny

Performant pure-PHP AMQP (RabbitMQ) non-blocking ReactPHP library

7426.5M37](/packages/bunny-bunny)[aws/aws-php-sns-message-validator

Amazon SNS message validation for PHP

21421.5M91](/packages/aws-aws-php-sns-message-validator)[simple-bus/message-bus

Generic classes and interfaces for messages and message buses

3455.7M30](/packages/simple-bus-message-bus)[sabas/edifact

Tools in PHP for UN/EDIFACT

2881.6M7](/packages/sabas-edifact)

PHPackages © 2026

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