botman/driver-slack
Slack driver for BotMan, the PHP chatbot framework. Connect BotMan bots to Slack workspaces to handle messages, slash commands, and interactive events through a simple, fluent API. Works well for Laravel and standalone PHP chatbot projects.
Architecture fit. botman/driver-slack is a driver plugin for the BotMan conversational framework. It implements BotMan's driver contract so Slack-specific concerns — inbound webhook parsing, outbound chat.postMessage payloads, attachments, slash commands, interactive callbacks — sit behind the framework's fluent hears()/reply()/conversation API. For teams already standardized on BotMan (or on Laravel with botman/laravel), it is a natural extension point: bot logic stays channel-agnostic and Slack is swappable. For teams not on BotMan, it introduces a second framework on top of Laravel and should be evaluated as an "adopt BotMan" decision, not a "add a driver" decision.
Integration feasibility. Straightforward in the happy path: Composer install, publish a Slack config block (token + signing secret), register a webhook route, and point the Slack app's Event Subscriptions, Slash Commands, and Interactivity URLs at that route. The fluent API and MIT license keep the cost of a proof-of-concept low. The friction is almost entirely on the Slack platform side — app manifest, OAuth scopes, event subscriptions, and workspace admin approval — rather than in the PHP package.
Technical risk. This is the dominant concern. The last release was March 2019, and the underlying botman/botman core is likewise in maintenance mode. Since then Slack has made request signing secrets mandatory (legacy verification tokens are deprecated), expanded granular OAuth scopes, shifted interactive UX to Block Kit and modals/views, deprecated RTM in favor of Events API and Socket Mode, and continued to evolve payload schemas. Basic messaging and slash commands likely still function; modals, home tabs, shortcuts, and newer Block Kit surfaces are likely unsupported or require hand-rolled payloads. Secondary risks: unverified PHP 8.2/8.3 and Laravel 10/11 compatibility, Composer constraints that may pin older Guzzle/Symfony versions and block framework upgrades, and the security-critical nature of signature verification code that has not been audited since 2019.
Key questions.
Stack fit. Best fit is a Laravel application using botman/laravel plus this driver, deployed behind HTTPS with a queue worker available. It also works in plain PHP with a front controller, but Laravel's routing, config, and queue primitives remove most of the boilerplate. If the surrounding product is not Laravel, weigh the cost of standing up BotMan and its service container against a small purpose-built Slack webhook controller.
Migration path. Three realistic entry points: (1) greenfield — scaffold BotMan, add the driver, and build only the surfaces needed; (2) from a legacy RTM bot — reimplement handlers against the Events API webhook model, since RTM is gone and the event shapes differ; (3) from a bespoke Slack integration — port handler logic into BotMan's hears()/conversation API, which is the largest effort and where most schedule risk sits. In all cases plan for a fork: vendor the package via a private Composer repository so patches are not blocked on upstream.
Compatibility. Before committing, run a composer why-not / dependency-resolution check against the target PHP and Laravel versions, confirm the Guzzle major version, and verify the Slack app's signing secret is validated on every request. Treat "installs and boots on our stack" as a gate, not an assumption. Confirm the Slack app manifest uses current scopes and event names rather than 2019-era defaults.
Sequencing.
Maintenance. Assume upstream is dormant. Budget recurring engineering time for Slack API drift, security patches, and PHP/framework upgrades — modest, but not zero, and it recurs. Without a fork and a named owner, this package becomes an unowned liability that surfaces at the worst moment, typically during a framework upgrade.
Support. Community-only: 51 stars, no vendor, sparse documentation beyond the description. Expect engineers to read source to understand attachment and interactive payload shapes. Escalation is internal by definition; there is no external party to page.
Scaling. Slack imposes per-workspace, tier-based rate limits (roughly 50–100 requests/minute for common methods, with 429 and Retry-After on breach), and slash commands and interactivity require a response within three seconds. That means the webhook endpoint must acknowledge immediately and hand work to a queue — a design decision the driver does not make for you. Horizontal scaling also requires moving BotMan's conversation cache off the default file driver to Redis; on multiple instances, file-based caching will produce inconsistent conversation state. Slack retries events, so handlers must be idempotent and deduplicated on event ID / X-Slack-Retry-Num.
Failure modes. Signature-verification failures after secret rotation; three-second timeouts causing Slack retries and duplicate bot messages; 429 storms under bursty usage; webhook endpoint downtime silently dropping events; misconfigured event subscriptions producing a bot that "works" in testing but never receives mentions; cache backend outages breaking all conversations; and stale dependency constraints blocking a Laravel upgrade at the portfolio level.
Ramp-up. A Laravel developer new to BotMan should expect one to two days to a first working slice and roughly a week to production-grade handling with queues, idempotency, and tests. BotMan fluency is the smaller part — the larger and more frequently underestimated cost is Slack platform literacy (app manifests, scopes, event subscriptions, install flow, and workspace admin approvals), which often sits outside the engineering team and should be scheduled as a dependency, not an afterthought.
How can I help you explore Laravel packages today?