Skip to content
CAI
Software that uses CAICheck a score

abraham/twitteroauth

60.1

Adequate · 19 September 2026

1.8k

lines of production code

PHP

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a PHP library for interacting with the X.com (formerly Twitter) API, supporting both API v1.1 and v2 endpoints. It handles core operations such as OAuth authentication, HTTP request management, and media uploads, while providing utilities for robust JSON decoding. The project is currently in maintenance mode, focusing on code hygiene, testing, and compatibility with modern PHP versions rather than new feature development.

Behavioural changes

Extracted JSON decoding to a dedicated utility class

The JSON decoding logic has been moved from scattered locations into a new \JsonDecoder\ class within the \src/Util\ directory. This change centralizes the handling of JSON strings, ensuring consistent behavior across the application by automatically applying \JSON\_BIGINT\_AS\_STRING\ for PHP versions prior to 5.4 or when integer size is limited, and \JSON\_THROW\_ON\_ERROR\ otherwise. Users benefit from a more robust and maintainable approach to parsing JSON responses, reducing the risk of silent failures or precision loss with large integers.

src/Util · high confidence

Project maintenance and documentation overhaul

This release introduces several structural and documentation updates to improve project hygiene and contributor experience. A Code of Conduct and Contributing guide have been added to clarify community standards and submission processes. The README has been updated to reflect that the library is now in maintenance mode with no new feature development planned, and it specifies support for PHP versions in active support or security-fix-only status. Configuration files for Prettier (targeting PHP 8.0 formatting) and Rector (up to PHP 7.4) have been added to standardize code style and modernization. Additionally, .gitattributes and .gitignore have been configured to exclude development artifacts like tests, vendor directories, and IDE files from distributions, and a LICENSE file has been included.

(repo-wide) · high confidence

Refactor core library into modular classes with API v2 and X.com defaults

The library has been restructured into distinct classes (Config, Consumer, Token, Request, Response, etc.) to improve maintainability and testability. API requests now default to version 2 and target the x.com domain instead of twitter.com. A new Config class centralizes settings such as timeouts, retry counts, gzip encoding, and chunked upload sizes. HTTP communication is abstracted behind an HttpClientInterface with a new CurlHttpClient implementation, and a MockHttpClient is provided for testing with VCR-style fixtures. OAuth signing is handled by a dedicated HmacSha1 class, and the Response class now exposes the last API path, HTTP code, body, and X-rate-limit headers. The library also introduces a TwitterOAuthException with a parsedMessage method for easier error handling.

src · high confidence

Test coverage

Added comprehensive PHPUnit test suite for OAuth, API, and media operations; Added tests for JsonDecoder utility.

Dependencies

Initial project setup with PHP 8.2 and dev tooling

The project now includes its first \composer.json\ and \package.json\ files, establishing the dependency structure for the library. The PHP runtime requirement is set to version 8.2 or higher, and the library depends on \composer/ca-bundle\ for certificate handling. Development tooling is configured with PHPUnit 9, PHP\_CodeSniffer (supporting versions 3 and 4), Rector, Prettier, and Concurrency, enabling automated linting, code style enforcement, and testing workflows.

(dependencies) · high confidence

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

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 60.

Lenses

  • Code Health 98
  • Architecture 96
  • Maturity 39
  • Readiness 64
  • Security 92

Changes since last survey

  • 300 commits — 298 feature/other, 2 fixes

By area

  • (repo) — 147 commits
  • (root) — 123 commits
  • .github/workflows — 11 commits
  • src/TwitterOAuth.php — 6 commits
  • tests/TwitterOAuthMediaTest.php — 4 commits
  • src/TwitterOAuthException.php — 2 commits
  • tests/fixtures — 2 commits
  • src/Config.php — 1 commit
  • src/CurlHttpClient.php — 1 commit
  • src/HmacSha1.php — 1 commit
  • src/Request.php — 1 commit
  • tests/TwitterOAuthLastTest.php — 1 commit

Notable commits

  • fix: Fix implicitly marking parameter as nullable
  • fix: Fix prettier
  • change: Add TwitterOAuthException#parsedMessage
  • change: Add maintenance note
  • change: Add test
  • change: Bump @prettier/plugin-php
  • change: Bump @prettier/plugin-php from 0.19.2 to 0.19.3
  • change: Bump @prettier/plugin-php from 0.19.3 to 0.19.4
  • change: Bump @prettier/plugin-php from 0.19.4 to 0.19.5
  • change: Bump @prettier/plugin-php from 0.19.5 to 0.19.6
  • change: Bump @prettier/plugin-php from 0.19.6 to 0.19.7
  • change: Bump @prettier/plugin-php from 0.22.2 to 0.22.4
  • change: Bump @prettier/plugin-php from 0.22.4 to 0.23.0
  • change: Bump @prettier/plugin-php from 0.23.0 to 0.24.0
  • change: Bump @prettier/plugin-php from 0.24.0 to 0.25.0
  • change: Bump actions/checkout from 3 to 4
  • change: Bump actions/checkout from 4 to 5
  • change: Bump actions/checkout from 5 to 6
  • change: Bump actions/checkout from 6 to 7
  • change: Bump actions/setup-node from 3 to 4
  • …and 280 more

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

Survey your own repository

abraham/twitteroauth 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 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 3c3e63c6648a873c33f7307260dce5cf06f3c760 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.