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

Clank Bundle Laravel Package

jdare/clank-bundle

Clank Bundle integrates the Clank PHP Slack bot library with your framework, adding configuration and service wiring so you can register bots and handle Slack events without manual bootstrapping.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit ClankBundle is a Symfony2 bundle (not Laravel) that embeds the Ratchet WebSocket server into a Symfony application. Its architecture is fundamentally host-framework coupled: it registers DependencyInjection extensions, YAML/XML service definitions, a kernel event subscriber for session bridging, annotation-driven topic/RPC handlers, and a clank:server console command that boots a long-running ReactPHP event loop. None of that container wiring transfers to Laravel — the domain concepts (topic pub/sub, RPC from browser to PHP services, session sharing, WAMP protocol support) transfer, the implementation does not. For a TPM this is the central decision: this package is a reference architecture, not an installable dependency. The value is in its service topology and session-sharing pattern, both of which we would re-implement against Laravel's service container and session store.

Integration feasibility Effectively zero for direct composer require. The code targets PHP 5.3/5.4-era syntax and Symfony 2.x APIs (FilterResponseEvent, getContainer() semantics, older Ratchet 0.4.x interfaces). Running it on PHP 8.2+ / Laravel 10-11 would require a fork and rewrite of the bundle layer before reaching any application logic. MIT license permits that, but the effort is 100% net-new code with no upstream to track. The realistic feasibility is: 1-2 engineer-days to read and extract the session-bridge and topic-registry patterns; 3-6 engineer-weeks to build and harden an equivalent on Laravel.

Technical risk High and concentrated in three areas. (1) Abandonment: last release 2013-11-23, 0 dependents, single maintainer — no CVE response, no PHP compatibility work, no ecosystem validation. (2) Upstream decay: Ratchet itself is effectively dormant; the dependency chain is unmaintained at two levels. (3) Long-running process semantics: any adoption path inherits the event-loop model — a single blocking call (sync DB, sync HTTP, file I/O) stalls all connections. The score of 7.99 reflects historical relevance and clean design intent, not current viability; the 14.5 opportunity score signals limited upside versus first-party alternatives. This is a build-vs-adopt risk, not a package-risk, because we should not be adopting it.

Key questions

  • Is our requirement genuine bidirectional messaging (client→server RPC, presence, authoritative state) or just server→client fan-out? Fan-out should go to Laravel Reverb / Pusher / Soketi and end the evaluation.
  • Is WAMP a hard requirement (interop with existing WAMP clients, cross-language routing)? If yes, the candidate set is WAMP routers (Crossbar, Thruway), not this bundle.
  • Do we need HTTP session continuity into the socket (auth-at-connect, per-user channels)? That is the one pattern worth copying.
  • What is our PHP runtime baseline and do we accept a long-running worker in the deploy topology?
  • Is there any budget for maintaining a fork, or does the org mandate supported dependencies?

Integration Approach

Stack fit Poor as a package, good as a pattern source. The transferable assets are: (a) the session bridge — how an authenticated HTTP session is resolved and bound to a socket connection ID at handshake; (b) the topic registry — namespaced subscribe/unsubscribe with server-side service handlers; (c) the RPC dispatch layer — mapping client messages to container-resolved services; (d) the console-command-as-server operational shape. In Laravel these map to: signed handshake token or session cookie validation, Broadcast::channel() authorization callbacks, job/event dispatch, and an Artisan command. If we keep Ratchet as the transport engine, we would consume cboden/ratchet directly behind a thin Laravel service provider, deliberately avoiding any Symfony-flavored abstraction.

Migration path

  • Phase 0 (1 week): Spike. Answer the requirement questions; confirm whether WAMP matters. Do not install ClankBundle.
  • Phase 1 (1-2 weeks): Reference read of ClankBundle's session-bridge and topic-handler design; document the equivalent Laravel design. Deliverable is a design doc, not code.
  • Phase 2 (2-4 weeks): Prototype the Laravel-native path first — Reverb + Echo, channel auth, presence. Only fall back to a bespoke Ratchet server if a hard requirement (WAMP, custom wire protocol, non-Pusher clients) blocks it.
  • Phase 3: If bespoke: Laravel service provider + Artisan ws:serve command + Redis pub/sub for cross-node fan-out + connection registry in Redis. Harden auth, heartbeats, graceful shutdown.
  • Phase 4: Cutover behind a feature flag with dual-run (old polling path + new socket path) for one release cycle.

Compatibility No PHP 8 / Laravel compatibility. No illuminate/* support. No maintained test suite against modern PHPUnit. Ratchet's ReactPHP version constraints will conflict with anything current. Treat as incompatible by default and require an explicit, documented exception if anyone proposes installing it.

Sequencing Requirements clarification → alternative evaluation (Reverb/Pusher/Soketi/Mercure) → reference-pattern design → prototype → build vs. buy decision gate → production hardening → cutover. The critical sequencing rule: never begin implementation on Ratchet before the WAMP/transport question is closed, because that answer determines whether the effort is 2 weeks or 6.

Operational Impact

Maintenance The package itself is unmaintained, so any adoption transfers 100% of maintenance to us with no upstream. Even in the reference-pattern path, we own a long-running PHP daemon — a class of software this team must be staffed to operate. Budget ongoing engineering capacity, not a one-time integration.

Support No vendor, no SLA, no security response channel. 129 stars and 0 dependents indicate the community has already moved on. If we fork, we become the maintainer of record for a component with no external validation. Escalation paths are internal only.

Scaling Ratchet and this bundle are single-process, in-memory for topic state. Horizontal scaling requires adding a shared bus (Redis pub/sub or a message queue) that the package does not provide, plus a shared connection/presence registry. Sticky sessions at the load balancer, or a shared handshake store, are mandatory. Connection-per-worker limits and file-descriptor ceilings become capacity-planning inputs. Contrast: Reverb/Pusher give horizontal scale as a first-class concern with a documented protocol.

Failure modes

  • Silent process death → all clients drop with no application-level signal; requires supervisor + health checks + client reconnect with backoff.
  • Memory growth in a long-running loop → mandatory periodic recycle and per-connection cleanup on abnormal disconnect.
  • Blocking call stalls the loop → cascading latency across all sockets, single-threaded.
  • Session/auth staleness → connections outliving revoked credentials unless re-validated.
  • Deploy restarts → connection churn storm; need graceful drain and client jitter.
  • No delivery guarantees → messages lost on disconnect; any state-critical path needs an HTTP/queue fallback.
  • TLS/proxy misconfiguration → silent upgrade failures behind ALB/nginx, a recurring support-ticket generator.

Ramp-up Moderate-to-high. Requires ReactPHP event-loop literacy, WebSocket handshake and WAMP protocol familiarity, and operational skill with supervised daemons. Debugging is materially harder than request/response PHP — stack traces cross async boundaries, and the most common defect (an accidental sync call) produces latency symptoms rather than errors. Hiring market for Ratchet-specific skills is thin; the team's Laravel-ecosystem knowledge does not transfer to this component.

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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core