Skip to content
CAI
Software that uses CAICheck a score

sebastianbergmann/recursion-context

63.2

Adequate · 17 November 2026

571

lines of production code

PHP

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Behavioural changes

1 commit (0 fixes) modifying tools

A change to existing behaviour in tools — 1 commit, 4 files: “Update dependency php-cs-fixer/shim to ^3.95.31”. Also in this area: 3 commits (0 fixes) modifying tools.

tools/.php-cs-fixer · medium confidence · unverified

171 commits (0 fixes) modifying tools

A change to existing behaviour in tools — 171 commits, 4 files: “Update tools”; “Use PHPStan instead of Psalm”; “\* 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"”; and 4 more.

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

Repository tooling and configuration overhaul

The project has replaced its legacy build and static analysis setup with modern standards: Psalm is removed in favor of PHPStan (configured at level 10 with strict rules), and the PHPUnit configuration is updated to enforce strict coverage metadata and deprecation handling. Build automation now relies on a \build.xml\ that manages tools via Phive and Composer, while \.gitattributes\ and \.gitignore\ are updated to exclude development artifacts from exports. Additionally, a \SECURITY.md\ policy is added, and the license text is reformatted.

(repo-wide) · high confidence

Test coverage

Added unit tests for the Context class

Added a new test suite (ContextTest) for the SebastianBergmann\\RecursionContext\\Context class, verifying behavior for adding and detecting arrays and objects, handling self-referencing structures, and ensuring distinct keys are assigned correctly.

tests · high confidence

Dependencies

Major version upgrade to 8.0 with PHP 8.4 requirement and PHPUnit 13

This release upgrades the library to version 8.0, raising the minimum PHP version from 5.3.3 to 8.4 and updating the development dependency phpunit/phpunit to ^13.3.6. The project also drops support for older PHP versions, switches the default branch to main, and adds a security policy link to the composer.json support metadata.

(dependencies) · high confidence

PHPStan static analysis tooling upgraded to version 2.x

The \tools/.phpstan\ directory now includes a Composer-managed vendor environment, installing \phpstan/phpstan\ version 2.2.14, \phpstan/phpstan-strict-rules\ version 2.0.12, and \ergebnis/phpstan-rules\ version 2.13.1. This upgrade brings the static analysis engine to its major 2.0 release, which includes stricter default behaviors and updated rule sets for PHP code analysis, alongside the \phpstan/extension-installer\ plugin to automatically manage these extensions. Also in this area: 1 commit (0 fixes) modifying tools, tools/.phpstan/vendor/phpstan/phpstan-strict-rules; 2 commits (0 fixes) modifying tools, tools/.phpstan/vendor/ergebnis/phpstan-rules; Updated phpstan to version 2.3.1; Updated PHPStan and strict-rules to 2.3.0 and 2.1.0.

tools/.phpstan · 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 63.2 → 63.2 (0.0)
  • Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 100.0 → 100.0 (0.0)
  • Architecture 69.0 → 69.0 (0.0)
  • Maturity 48.9 → 48.9 (0.0)
  • Readiness 79.1 → 79.1 (0.0)
  • Security 81.2 → 81.2 (0.0)

Findings

  • No change — the same findings as the prior survey.

Changes since last survey

  • 14 commits — 14 feature/other, 0 fixes

By area

  • tools/.phpstan — 6 commits
  • (repo) — 3 commits
  • (root) — 2 commits
  • tools/.php-cs-fixer — 2 commits
  • tools/composer — 1 commit

Notable commits

  • change: Manage PHP-CS-Fixer with Composer instead of Phive
  • change: Merge branch '7.0'
  • change: Merge branch '7.0'
  • change: Merge branch '7.0'
  • change: Remove stale entry
  • change: Update dependency ergebnis/phpstan-rules to ^2.17.1
  • change: Update dependency ergebnis/phpstan-rules to ^2.17.1
  • change: Update dependency php-cs-fixer/shim to ^3.95.31
  • change: Update dependency phpstan/phpstan to ^2.3.6
  • change: Update dependency phpstan/phpstan-phpunit to ^2.1.2
  • change: Update dependency phpunit/phpunit to ^13.4.7
  • change: Update tools
  • change: Use phpstan/phpstan-deprecation-rules
  • change: Use phpstan/phpstan-phpunit

Written by cca.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 17 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 e77f240a6c3a0a39a2059e7b8869f2cbfd539359 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — 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.84+preprod-d645ca9bbedd.