Skip to content
CAI
Software that uses CAICheck a score

sebastianbergmann/recursion-context

59.9

Adequate · 19 September 2026

571

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 focused on managing recursion contexts, featuring a modernized Context API with strict typing and memory leak prevention. It provides tooling for static analysis via PHPStan and automates release note extraction, while maintaining comprehensive test coverage for object and array handling.

Behavioural changes

170 commits (0 fixes) modifying tools

A change to existing behaviour in tools — 170 commits, 4 files.

tools · medium confidence · unverified

Automated release note extraction script added

A new PHP script, \build/scripts/extract-release-notes.php\, has been added to the build tooling. This utility automates the extraction of release notes from the \ChangeLog.md\ file based on a specified version tag, supporting the workflow of creating releases when tags are pushed.

build · high confidence

Refactored recursion context tracking with new Marker class and modernized Context API

The library now uses a dedicated \Marker\ class to track arrays within the recursion context, replacing the previous internal mechanism. The \Context\ class has been modernized with strict typing, PHP 8.0+ features (such as union types and constructor property promotion), and improved performance by using \spl\_object\_id()\ instead of \spl\_object\_hash()\. Additionally, the custom \Exception\ interface and \InvalidArgumentException\ class have been removed in favor of standard PHP exceptions, and the \Context\ destructor now properly cleans up markers from tracked arrays to prevent memory leaks.

src · high confidence

Switched static analysis from Psalm to PHPStan and updated tooling configuration

The project has replaced Psalm with PHPStan for static analysis, introducing a new phpstan.neon configuration file that sets the analysis level to 10 and enables strict rules. This change is accompanied by updates to the PHPUnit configuration (phpunit.xml) and the removal of the legacy phpunit.xml.dist file, reflecting a broader shift in development tooling and configuration standards.

(repo-wide) · high confidence

Test coverage

Added tests for Context class

Added tests for the Context class, covering object and array handling, self-referencing structures, and context isolation.

tests · high confidence

Dependencies

Major version upgrade to PHP 8.4 and PHPUnit 13

The project has been upgraded to require PHP 8.4 or higher, dropping support for all previous PHP versions. This major version bump (now 8.0-dev) also updates the development dependency phpunit/phpunit to version ^13.3.4. Additionally, the composer.json configuration has been modernized with platform targeting, optimized autoloading, sorted packages, and a switch to HTTPS for the homepage and support URLs.

(dependencies) · high confidence

Updated PHPStan static analysis tooling to version 2.2.14

The PHPStan static analysis tool and its associated extensions in the \tools/.phpstan\ directory have been updated to version 2.2.14, along with \phpstan/phpstan-strict-rules\ (2.0.12) and \ergebnis/phpstan-rules\ (2.13.1). This upgrade brings the latest rule sets and bug fixes to the local development environment, ensuring that static analysis runs against the most current standards for code quality and type safety.

tools/.phpstan · 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 100
  • Architecture 69
  • Maturity 41
  • Readiness 78
  • Security 88

Changes since last survey

  • 300 commits — 293 feature/other, 7 fixes

By area

  • .phive/phars.xml — 79 commits
  • (root) — 75 commits
  • .github/workflows — 55 commits
  • tools/.phpstan — 40 commits
  • (repo) — 24 commits
  • src/Context.php — 11 commits
  • tests/ContextTest.php — 10 commits
  • .github/FUNDING.yml — 2 commits
  • .github/CODE_OF_CONDUCT.md — 1 commit
  • .github/CONTRIBUTING.md — 1 commit
  • .psalm/baseline.xml — 1 commit
  • .psalm/config.xml — 1 commit

Notable commits

  • fix: Fix CS/WS issues
  • fix: Fix CS/WS issues
  • fix: Fix CS/WS issues
  • fix: Fix CS/WS issues
  • fix: Fix branch name
  • fix: Fix package name
  • fix: Fix/Tweak
  • change: * Install PHPStan using Composer in order to be able to use phpstan/phpstan-strict-rules and tomasvotruba/type-coverage * Configure phpstan/phpstan-strict-rules, tomasvotruba/type-coverage, and ergebnis/phpstan-rules * Update PHPStan configuration * Put Phive binary under version control and manage it through "ant update-tools"
  • change: Add Liberapay and Tidelift
  • change: Add Security Policy
  • change: Add documentation on how to contribute
  • change: Add link to security policy
  • change: Add thanks.dev
  • change: Add type annotations
  • change: Allow write operations
  • change: Also automerge minor updates
  • change: Backport changes from main branch
  • change: Bump
  • change: Bump
  • change: Bump
  • …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

sebastianbergmann/recursion-context 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 cd9ff30eb45a7b142bb91891c7dab42a377af691 — 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.