romanzipp/laravel-twitch
Laravel Twitch is a clean wrapper around the Twitch Helix API for Laravel apps. It handles OAuth token management and provides fluent methods for users, streams, games, clips, and more, letting you integrate Twitch data without writing boilerplate HTTP code.
Twitch::users(...) style wrappers instead of hand-rolling HTTP and token lifecycle code. The decision it informs is: do we spend 1–2 sprint weeks of engineering on a first-party Twitch client, or a few days wiring this up and validating the feature?composer update — see the cost list below. That means the PM call is no longer "adopt or not," it's "greenfield on 4.x, or timebox a 3.x→4.x migration for an existing integration."getPagination(), getPaginator()) keep paged galleries cheap to build..env-driven secrets. On a polyglot or non-Laravel stack, this package is a non-starter and the "build" branch becomes the default.Adopt it when all of these hold:
composer.json on the 4.x branch against your framework and PHP version. 4.0.0 is a maintenance signal (the maintainer is still shipping, and it drops Guzzle 6.3), but the release notes advertise API changes, not a Laravel-version support matrix; verify before you design around it.Result properties are now private behind getters (->data → ->getData(), ->total/->pagination → ->getTotal()/->getPagination()), status()/error()/rateLimit() were renamed to getStatus()/getErrorMessage()/getRateLimit(), Result::$success is gone (branch on the status code instead), three credential exceptions collapsed into RequestRequiresAuthenticationException, Helpers\Paginator moved to Objects\Paginator, and the cache-driver config key was removed.Look elsewhere (or budget a thin in-house client over Guzzle/Saloon) when:
To executives: Twitch integration can be tested for roughly a few engineering days instead of a multi-week build, using a free MIT-licensed library that plugs directly into our existing Laravel stack. It gives us live-status, creator-profile, and VOD/clip data with no new vendor contract and no new infrastructure — the cheapest possible way to find out whether a Twitch-powered feature moves activation or retention before we staff it. The trade-off is explicit and small: the library is a small, single-maintainer project that releases infrequently (4.0.0 is the current major), so we treat it as prototype-grade, cap the investment, and revisit a maintained or in-house client only if the feature earns its roadmap slot. For any existing Twitch code on the prior major, treat the upgrade as a small, scoppable piece of work — not a free version bump.
To engineering: It handles the parts nobody wants to write twice — credential config, app and user OAuth token acquisition/refresh, and endpoint wrappers behind a facade — so we ship features, not plumbing. Two things changed with 4.0.0 that affect our plan. First, it's a breaking major: Result properties are private behind getters, status()/error()/rateLimit() became getStatus()/getErrorMessage()/getRateLimit(), Result::$success was removed, the three "requires client id/secret/redirect uri" exceptions were consolidated into RequestRequiresAuthenticationException, Paginator moved to the Objects namespace, and the cache-driver config key is gone — so grep for ->data, ->success, ->status(), ->error(), and any published config before estimating. Since the cache setting is no longer configurable, re-check where app tokens are cached if we run multiple instances. Second, a new major is evidence the maintainer is alive, which softens — but does not remove — the bus-factor risk; we still assume we fork it for fixes rather than wait on upstream. Recommend a time-boxed spike with three exit criteria: (1) token acquisition and refresh work against our Laravel/PHP version on 4.x, (2) the three endpoints we actually need return what the product spec requires, (3) any 3.x code is either migrated or deliberately pinned with a documented reason. If the first two fail, fall back to a 200-line first-party client.
How can I help you explore Laravel packages today?