Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Slack Php Api Laravel Package

jolicode/slack-php-api

A complete, type-safe PHP client for the Slack API, generated from Slack's official OpenAPI specification. It covers every endpoint and model and works with any PSR-18 HTTP client and PSR-16 cache, so it drops easily into modern PHP projects.

Deep Wiki
Context7

Technical Evaluation

Architecture fit. jolicode/slack-php-api is a generated PHP client for Slack's official Web API OpenAPI specification, built on the Jane PHP code-generation toolchain. It provides typed endpoint classes (one per Slack Web API method) and typed response/request models, and speaks PSR-18/PSR-17, so it drops into any modern PHP application without framework coupling. For a Laravel codebase, that means it is a transport-level SDK, not a Laravel package: no service provider, no facade, no config publish, no queue or event integration. It fits when we need broad, programmatic coverage of Slack Web API methods (messaging, conversations, views/modals, files, users, reactions, pins, admin endpoints) and want compile-time-ish safety over hand-rolled Guzzle calls.

Integration feasibility. High. The footprint is one Composer dependency plus a PSR-18 client (Guzzle, Symfony HttpClient, or an adapter around Laravel's own HTTP client). Construction is a matter of instantiating the generated client with an HTTP client, request factory, and serializer, then binding it as a container singleton. A working prototype for chat.postMessage is an afternoon; a production-grade wrapper is one to two sprints.

Technical risk. The dominant risk is schema drift, not runtime instability. Because classes are generated from Slack's spec, upgrades are mechanically regenerated artifacts — cheap to adopt, but they can rename or reshape types, and Slack periodically deprecates methods (e.g., the files upload lineage). Any domain code that touches generated classes directly becomes brittle. Secondary risks: the package covers the Web API only — OAuth install flow, Events API subscription handling, Socket Mode, and inbound request signature verification are ours to build; and the release cadence (last release dated 2026-09-25 in the metadata, 256 stars) suggests a small-maintainer project with limited commercial support. MIT licensing removes legal friction but not bus-factor exposure. Adoption score (25.6) and opportunity score (5.71) both read as "niche, credible, not a strategic bet."

Key questions.

  • Which exact Slack methods do our use cases require, and are all of them present in the current generated surface?
  • What is the real regeneration cadence, and is there a documented upgrade policy or changelog per Slack spec bump?
  • Does the generated client expose Slack's ok/error envelope and HTTP-level 429/Retry-After semantics in a way we can intercept, or do we wrap every call?
  • Who owns the maintainer relationship if we standardize on this for three or more product surfaces?
  • Are we willing to accept a single PSR-18 client choice, or do we need to swap it per environment (e.g., proxy, mTLS)?

Integration Approach

Stack fit. Clean. PHP 8.x + Laravel 9–12 is fully supported by the underlying PSR standards. The only friction is that Laravel's Http facade is not PSR-18 out of the box — either register Guzzle/Symfony HttpClient as the PSR-18 implementation, or use a thin PSR-18 adapter so we retain Laravel's logging and HTTP event hooks. I recommend the adapter: it keeps observability consistent and avoids a second HTTP stack in the container.

Migration path. For teams currently on raw Guzzle calls, slack-php/slack-php-api (the older, effectively unmaintained client), or maknz/slack, the migration is mechanical: each imperative call maps 1:1 to a generated endpoint method. Sequence it as (1) introduce an internal SlackGateway interface and adapter implementation backed by this package, (2) migrate call sites behind that interface feature-flag by feature-flag, (3) run shadow traffic against a test workspace comparing payloads and responses, (4) delete the legacy path. Doing step 1 first is non-negotiable — it is the seam that absorbs regeneration churn and any future swap.

Compatibility. Verify: PHP version floor, PSR-18 client compatibility with our existing Guzzle/Symfony versions, serializer dependency overlap (Jane runtime + Symfony Serializer components) with anything already installed, and whether the package's exception types need mapping into our application's error hierarchy. Multi-workspace token storage belongs in our config/DB layer, never in the SDK — the generated client takes a token, not a tenant model.

Sequencing.

  1. Bind the client as a singleton via a dedicated SlackServiceProvider; config file for tokens, timeouts, retry policy.
  2. Wrap with SlackGateway + typed internal DTOs; forbid generated classes outside that namespace (enforce with a static-analysis rule).
  3. Build the outbound path: queued jobs, per-workspace rate limiter, exponential backoff on 429 honoring Retry-After.
  4. Build the inbound path separately: route + middleware verifying X-Slack-Signature (v0 HMAC, timestamp replay window ≤5 min), ack under 3 seconds, dispatch to jobs.
  5. Add multi-workspace token resolution and rotation, then observability (per-method latency, error-code counters, 429 rate).

Operational Impact

Maintenance. Low-to-moderate recurring cost, lumpy. Regeneration releases are cheap to consume (Composer bump, run test suite, fix type drift); the expensive part is the discipline of keeping generated classes behind our adapter. Slack's own API deprecations, not the package, will drive most of the change requests. Pin to a minor version, upgrade deliberately each quarter, and keep a checklist for "new Slack method we need" — if the spec lags, we either wait or hand-roll one endpoint outside the SDK.

Support. Community-only: GitHub issues, maintainer goodwill, no SLA, no vendor to escalate to. Mitigate with the adapter seam — worst case, we swap the transport without touching product code — and by documenting the Slack-side behaviors (scopes, tier limits, error codes) internally rather than relying on package docs.

Scaling. The client is stateless and process-local, so it scales horizontally with the app with no special handling. The binding constraint is Slack's tiered rate limits, not PHP. Outbound volume must be shaped at the queue layer: dedicated Slack queue, per-workspace and per-method limiters, chunked fan-out for broadcast messages (e.g., conversations.members pagination + batched chat.postMessage), and Retry-After-driven backoff. Large file operations must stream rather than buffer to avoid memory pressure under load.

Failure modes to instrument.

  • HTTP 429 / ratelimit — most common; needs backoff, not retry storms.
  • invalid_auth, token_revoked, account_inactive — workspace-level outage; alert and disable that tenant's queue rather than retrying.
  • missing_scope / not_in_channel — deployment/config defects surfaced only in production; fail fast and loud.
  • channel_not_found, user_not_found — stale IDs from our own data; treat as data reconciliation work.
  • deprecated_method / schema drift — silent behavioral change after a Slack deploy; contract tests against a real test workspace catch this.
  • PSR-18 misconfiguration (timeouts, DNS, proxy, no connection reuse) — presents as intermittent latency; fix with explicit timeout and pool settings.
  • Inbound signature verification gaps — security exposure, not availability; must be coded, tested, and reviewed.

Ramp-up. A mid-level Laravel developer becomes productive with the outbound path in 2–3 days (generated endpoints are discoverable and typed, which is the package's main developer-experience win). Production hardening on the inbound path, rate-limit shaping, multi-workspace tokens, and observability is roughly 1–2 sprints for a small team. The hidden cost is Slack-domain literacy — scopes, install flow, tier limits, payload constraints — which the package does not teach; budget for the team to read Slack's docs directly, because that knowledge outlives whichever SDK we choose.

TPM recommendation. Adopt as the transport for Slack Web API calls, behind a mandatory internal adapter, scoped initially to one high-value use case. Do not treat it as a turnkey Slack integration platform: it is a generated, well-typed, framework-agnostic client with real but manageable maintenance exposure and no support contract. Given the adoption score and low opportunity score, position it as a pragmatic commodity dependency rather than a strategic platform commitment.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route