PHPackages                             maartenpaauw/php-slack-constants - 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. maartenpaauw/php-slack-constants

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

maartenpaauw/php-slack-constants
================================

PHP enums for Slack API events

1.1.0(9mo ago)497[1 PRs](https://github.com/maartenpaauw/php-slack-constants/pulls)MITPHPPHP ^8.4CI passing

Since Aug 3Pushed 3mo agoCompare

[ Source](https://github.com/maartenpaauw/php-slack-constants)[ Packagist](https://packagist.org/packages/maartenpaauw/php-slack-constants)[ Docs](https://github.com/maartenpaauw/php-slack-constants)[ GitHub Sponsors](https://github.com/maartenpaauw)[ RSS](/packages/maartenpaauw-php-slack-constants/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

PHP enums for Slack API events
==============================

[](#php-enums-for-slack-api-events)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5a257d63e4fa19f8bb9b37aa8ac76fdba08aa8599a8e095b7ace3694c470dce9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61617274656e70616175772f7068702d736c61636b2d636f6e7374616e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/maartenpaauw/php-slack-constants)[![Tests](https://camo.githubusercontent.com/eb5c9d317d9719d675fb7369c691ed687318ba4663d765641b17709533e06303/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d61617274656e70616175772f7068702d736c61636b2d636f6e7374616e74732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/maartenpaauw/php-slack-constants/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/d11009b2ac70ba502b2b51810fc7eece2fb7a2293417928d07865a2d0bd11997/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61617274656e70616175772f7068702d736c61636b2d636f6e7374616e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/maartenpaauw/php-slack-constants)

This package provides a PHP string-backed enum for the Slack API events with full support for the Events API and RTM API. The package helps you maintain consistency by preventing typos and provides context about each event, such as whether it's supported by certain APIs.

Support Me
----------

[](#support-me)

 [ ![Model States for Filament](https://raw.githubusercontent.com/maartenpaauw/model-states-for-filament-docs/main/assets/images/model-states-for-filament-banner.jpg) ](https://filamentphp.com/plugins/maartenpaauw-model-states)

You can support me by [buying Model States for Filament](https://filamentphp.com/plugins/maartenpaauw-model-states).

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

[](#installation)

You can install the package via composer:

```
composer require maartenpaauw/php-slack-constants
```

Usage
-----

[](#usage)

### Events

[](#events)

The `Events` class provides a strongly typed way to work with Slack API events while providing context about API support.

```
use Maartenpaauw\Slack\Constants\Events;

Events::AppMention->value; // app_mention
Events::AppMention->supportsEventsApi(); // true
Events::AppMention->supportsRtmApi(); // false
```

### Scopes

[](#scopes)

The `Scopes` class provides a strongly typed way to work with Slack API token scopes that define permissions needed for API calls.

```
use Maartenpaauw\Slack\Constants\Scopes;

Scopes::BookmarksRead->value; // bookmarks:read
Scopes::BookmarksRead->supportsApplicationLevelTokens(); // false
Scopes::BookmarksRead->supportsBotTokens(); // true
Scopes::BookmarksRead->supportsConfigurationTokens(); // false
Scopes::BookmarksRead->supportsUserTokens(); // true
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Maarten Paauw](https://github.com/maartenpaauw)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance69

Regular maintenance activity

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.6% 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 ~1 days

Total

3

Last Release

278d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1eb4a0bcfac331e70a15093ef042e298e6997aebaaf1bd962b8de594cc2dd0a7?d=identicon)[maartenpaauw](/maintainers/maartenpaauw)

---

Top Contributors

[![maartenpaauw](https://avatars.githubusercontent.com/u/4550875?v=4)](https://github.com/maartenpaauw "maartenpaauw (31 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

slackphp-slack-constants

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/maartenpaauw-php-slack-constants/health.svg)

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

###  Alternatives

[maknz/slack-laravel

Laravel 4 and 5 integration for the maknz/slack package, including facades and service providers.

154969.3k1](/packages/maknz-slack-laravel)[jeremykenedy/slack-laravel

Laravel integration for the jeremykenedy/slack package, including facades and service providers.

54738.8k](/packages/jeremykenedy-slack-laravel)[razorpay/slack-laravel

Laravel 4 and 5 integration for the razorpay/slack package, including facades and service providers.

18375.3k1](/packages/razorpay-slack-laravel)

PHPackages © 2026

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