Skip to content
CAI
Software that uses CAICheck a score

sebastianbergmann/global-state

61.7

Adequate · 17 November 2026

1.1k

lines of production code

PHP

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add custom exception interfaces and classes

The library now includes a custom \Exception\ interface that extends PHP's \Throwable\, along with a \RuntimeException\ class that implements this interface. This provides a standardized way to handle exceptions within the \SebastianBergmann\\GlobalState\ namespace, allowing users to catch specific library errors more precisely.

src/exceptions · high confidence

New code export and global state restoration capabilities

The library now provides a \CodeExporter\ class that generates PHP code to recreate global state (constants, global variables, and ini settings) from a snapshot, enabling reproducible test environments. Additionally, a \Restorer\ class has been introduced to actively restore global variables and static properties to their snapshot values, while an \ExcludeList\ class allows users to configure which global variables, classes, and static properties should be ignored during snapshotting and restoration.

src · high confidence

Behavioural changes

1 commit (0 fixes) modifying tools/.php-cs-fixer

A change to existing behaviour in tools/.php-cs-fixer — 1 commit, 20 files: “Manage PHP-CS-Fixer with Composer instead of Phive”.

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

138 commits (0 fixes) modifying tools

A change to existing behaviour in tools — 138 commits, 4 files: “Update tools”; “Use PHPStan instead of Psalm”; “\* Have Composer in \tools/composer\ and managed through \composer self-update\ \* Install Psalm using Phive as \tools/psalm\ \* Install PHP-CS-Fixer using Phive as \tools/php-cs-fixer\”; and 4 more.

tools · medium confidence · unverified

Automated release note extraction and PHPUnit configuration removal

A new build script, \extract-release-notes.php\, has been added to automate the extraction of release notes from the \ChangeLog.md\ file based on a specified version tag, streamlining the release process. Concurrently, the legacy \phpunit.xml\ configuration file has been removed, indicating a shift away from the previous PHPUnit 4.2 testing setup.

build · high confidence

Modernized build automation and static analysis configuration

The project has replaced its legacy Travis CI and Ant-based build system with a modernized setup using GitHub Actions, PHPStan (replacing Psalm), and PHP-CS-Fixer. This change introduces new configuration files including \phpstan.neon\ (configured at level 10 with strict rules), \phpunit.xml\ for test execution, and \renovate.json\ for automated dependency updates. The build process now manages tools like Composer and Phive via a local \tools/\ directory, and the \.gitattributes\ file has been updated to exclude build artifacts and configuration files from archive exports.

(repo-wide) · high confidence

Test coverage

Added test fixtures for global state snapshotting; Added unit tests for global state management components.

Dependencies

Major version 9 release with PHP 8.4 requirement and updated dependencies

This release drops support for older PHP versions, requiring PHP 8.4 or higher, and bumps the package to version 9.0. It updates core dependencies to sebastian/object-reflector ^6.1.0 and sebastian/recursion-context ^8.0.1, and upgrades the development dependency phpunit/phpunit to ^13.3.6. The project also adds a security policy link, configures the autoloader for optimized performance, and moves the development branch to main.

(dependencies) · high confidence

Updated PHPStan static analysis tooling to version 2.2.16

The \tools/.phpstan\ directory has been updated to use PHPStan version 2.2.16, along with \phpstan-strict-rules\ 2.0.12 and \ergebnis/phpstan-rules\ 2.14.0. This update ensures the static analysis tooling is current with the latest rule sets and bug fixes, improving the accuracy and coverage of code quality checks for the project. 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.

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 61.9 → 61.7 (-0.2)
  • Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 75.2 → 74.0 (-1.2)
  • Architecture 69.0 → 69.0 (0.0)
  • Maturity 48.9 → 48.9 (0.0)
  • Readiness 79.1 → 79.1 (0.0)
  • Security 85.0 → 85.0 (0.0)

New (1)

  • Edited copy of a member (16 corresponding lines) (src/Restorer.php)

Changes since last survey

  • 16 commits — 15 feature/other, 1 fixes

By area

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

Notable commits

  • fix: Fix errors reported by PHPStan
  • change: Leftover from 486f6a43eb8b78a459f3d756cf0125617c0c34f9
  • change: Manage PHP-CS-Fixer with Composer instead of Phive
  • change: Merge branch '8.0'
  • change: Merge branch '8.0'
  • change: Merge branch '8.0'
  • change: Merge branch '8.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 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/global-state 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 d3318974f3b8d6ac847a9637f755ed5278aba4fc — 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.