Skip to content
CAI
Software that uses CAICheck a score

zairakai/php-packages/laravel-twitch

44.8

Weak · 10 November 2026

14k

lines of production code

PHP

primary language

9

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Twitch OAuth authentication and EventSub webhook handling

Introduces the TwitchAuthController to manage the full Twitch integration lifecycle. Users can now authenticate via OAuth, with the controller handling the authorization redirect, token exchange, and user profile synchronization. Additionally, the controller processes Twitch EventSub webhooks, including signature verification, challenge responses for subscription validation, and dispatching typed DTOs for notifications. It also explicitly handles revocation messages and implements robust error handling to prevent DTO construction failures from crashing the webhook endpoint.

src/Http · high confidence

Expanded Twitch API DTO coverage for Ads, Bits, Channel, and Chat features

This release adds a comprehensive set of new Data Transfer Objects (DTOs) to the \src/Dto\ directory, significantly expanding the library's support for the Twitch Helix API. The changes introduce structured models for managing ad schedules and snoozing (\AdSchedule\, \AdSnooze\, \CommercialResult\), detailed Bits analytics and leaderboards (\BitsLeaderboardEntry\, \Cheermote\, \CustomPowerUp\), and full channel management capabilities including stream schedules, channel information, and editor lists (\Channel\, \Schedule\, \ScheduleSegment\, \ChannelEditor\). It also adds support for Channel Points rewards and redemptions (\CustomReward\, \Redemption\), charity campaigns (\CharityCampaign\, \CharityDonation\), and extensive chat features such as settings, badges, emotes, pinned messages, and shared chat sessions (\ChatSettings\, \Badge\, \Emote\, \PinnedChatMessage\, \SharedChatSession\). Request DTOs are included for creating and updating channel schedules, rewards, and chat settings, ensuring type-safe interactions with these endpoints.

src/Dto · high confidence

Initial configuration for Twitch API, OAuth, and EventSub integration

This change introduces the core configuration files for the Twitch integration package. It adds \config/twitch.php\ to define application credentials, API endpoints, OAuth scopes (covering identity, chat, moderation, and channel management), and EventSub webhook settings. It also includes \config/dev-tools/insights.php\ to configure static analysis rules, specifically excluding certain service classes from cyclomatic complexity checks and adjusting fixers to resolve conflicts with PHPStan and Pint.

config · high confidence

Initial implementation of Twitch API service traits

This release introduces a comprehensive suite of new service traits in the \src/Services/Concerns\ directory, providing programmatic access to the Twitch Helix API. The new code covers Ads, Analytics, Bits, Channel management, Channel Points, Charity, Chat, Conduits, Content Labels, Drops, EventSub, Extensions, Games, Creator Goals, and Guest Star endpoints. Users can now interact with these features through dedicated methods such as \getAdSchedule\, \getExtensionAnalytics\, \getBitsLeaderboard\, \createCustomReward\, and \getEventSubSubscriptions\, enabling full integration with Twitch's broadcaster and extension ecosystems.

src/Services/Concerns · high confidence

Initial release of Laravel Twitch integration package

This change introduces a new Laravel package for integrating with Twitch, providing the core infrastructure for authentication and user management. It includes a database migration to create the \twitch\_users\ table, a \TwitchUser\ Eloquent model with methods for finding users by login or ID, checking token validity, and managing OAuth scopes. The package registers a service provider that binds \TwitchApiService\ and \TwitchOAuthService\ into the container, loads configuration, and defines routes for OAuth redirection, callback handling, and webhook reception under the \/twitch\ prefix.

(repo-wide) · high confidence

Initial release of Twitch API and OAuth services

This change introduces the core service classes for interacting with the Twitch platform: \TwitchApiService\ and \TwitchOAuthService\. \TwitchApiService\ provides methods for accessing Twitch API endpoints (such as user, stream, and game data) with built-in caching and handles app-level access tokens via client credentials. \TwitchOAuthService\ manages the user authorization flow, including generating authorization URLs, exchanging codes for tokens, refreshing tokens, and revoking or validating existing tokens. These services form the foundation for all Twitch-related functionality in the application.

src/Services · high confidence

Behavioural changes

2 commits (1 fix) modifying src/Facades

A change to existing behaviour in src/Facades — 2 commits (1 fix), 2 files: “chore: initial commit”; “fix(twitch): correct 7 wrong endpoint paths/shapes found via full API audit”.

src/Facades · medium confidence · unverified

41 commits (8 fixes) modifying (repo-wide)

A change to existing behaviour in (repo-wide) — 41 commits (8 fixs), 14 files: “fix(laravel-twitch): update laravel-dev-tools CI ref to v2.0.3”; “chore(deps): update the dependencies”; “docs(laravel-twitch): add phpDocumentor for auto-generated API docs”; and 29 more (refs \#28, \#29, \#30, \#23, \#26, …).

(repo-wide) · low confidence · unverified

Test coverage

Added tests for TwitchUser model and EventSub webhook fixtures

Added a new feature test class for the TwitchUser model, covering scope checking, token validity, user creation, lookup by login or ID, and token updates. Additionally, added a fixture file containing JSON payloads for numerous Twitch EventSub webhook events (such as automod, channel points, chat, and subscriptions) to support testing of webhook parsing and DTO mapping.

tests · high confidence

Dependencies

Update PHP and Laravel version requirements

The package now requires PHP 8.4 and supports Laravel 12 or 13, dropping support for older versions. This change updates the \composer.json\ manifest to reflect the new minimum runtime environment and framework compatibility. Also in this area: 1 commit updating dependencies (2 manifests); 2 commits updating dependencies (2 manifests); Update PHP dependencies to latest patch versions; Update dependencies for Laravel, PHPUnit, and Laravel Prompts; Update development dependencies and tooling versions; and 4 more.

(dependencies) · medium confidence · unverified

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 44 → 45 (+0.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 75 → 75 (+0.0)
  • Architecture 89 → 88 (-1.5)
  • Maturity 54 → 59 (+4.7)
  • Readiness 63 → 60 (-3.0)
  • Security 24 → 23 (-0.3)

Resolved (2)

  • Ambiguous naming of 'snoozeCount' in different contexts. In AdSchedule, it likely represents the remaining count of snoozes available for the current session. In AdSnooze, it likely represents the same or a related counter. While the names are identical, the semantic context (Schedule vs. Action/Result) is slightly different, but this is a minor domain distinction rather than a true API inconsistency. However, looking closer at the provided list, there are no actual conflicting operations or duplicate types with different names for the same intent. The types are distinct DTOs for distinct API responses.
  • Documentation: no contributor guidance (README.md)

Changes since last survey

  • 34 commits — 33 feature/other, 1 fixes

By area

  • (repo) — 22 commits
  • (root) — 12 commits

Notable commits

  • fix: fix(ci): publish the documentation with the release
  • change: Merge branch 'chore/update-dependencies-20261024' into 'develop'
  • change: Merge branch 'chore/update-dependencies-20261024' into 'develop'
  • change: Merge branch 'chore/update-dependencies-20261024' into 'develop'
  • change: Merge branch 'chore/update-dependencies-20261025' into 'develop'
  • change: Merge branch 'chore/update-dependencies-20261026' into 'develop'
  • change: Merge branch 'chore/update-dependencies-20261026' into 'develop'
  • change: Merge branch 'chore/update-dependencies-20261026' into 'develop'
  • change: Merge branch 'chore/update-dependencies-20261029' into 'develop'
  • change: Merge branch 'chore/update-dependencies-20261029' into 'develop'
  • change: Merge branch 'chore/update-dependencies-20261105' into 'develop'
  • change: Merge branch 'chore/update-dependencies-20261105' into 'develop'
  • change: Merge branch 'develop' into 'main'
  • change: Merge branch 'develop' into 'main'
  • change: Merge branch 'develop' into 'main'
  • change: Merge branch 'develop' into 'main'
  • change: Merge branch 'develop' into 'main'
  • change: Merge branch 'develop' into 'main'
  • change: Merge branch 'develop' into 'main'
  • change: Merge branch 'develop' into 'main'
  • …and 14 more

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

zairakai/php-packages/laravel-twitch was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 10 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 64a2daa6e60934be32575d87706135e98c138ff0 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.4+preprod-464a0040a931.