Skip to content
CAI
Software that uses CAICheck a score

phar-io/version

61.0

Adequate · 19 September 2026

682

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 parsing, comparing, and constraining semantic versions. It provides core classes to handle version strings, including pre-release suffixes and build metadata, alongside logic to validate versions against specific rules. The library supports complex constraint definitions using logical AND/OR grouping and various comparison operators.

Features

Initial implementation of version constraint classes

This change introduces the core version constraint logic for the PharIo\\Version library. It adds the VersionConstraint interface and an AbstractVersionConstraint base class, along with concrete implementations for matching any version, exact versions (including build metadata), greater-than-or-equal comparisons, specific major/minor versions, and logical AND/OR grouping of constraints. This provides the foundational behavior for validating version strings against defined rules.

src/constraints · high confidence

Initial import of PharIo/Version library for semantic versioning

This change imports the PharIo/Version library into the project, providing core classes for parsing, comparing, and constraining semantic versions. It introduces the Version class to handle version strings including pre-release suffixes (e.g., 'rc', 'beta') and build metadata, along with logic to ensure versions without pre-release suffixes are considered greater than those with them. The VersionConstraintParser now supports logical OR groups (using single or double pipes) and enforces specific minor version constraints for ^0.x ranges. Additionally, it adds support for the 'pl' pre-release label and ensures case-insensitive handling of pre-release suffixes.

src · high confidence

Behavioural changes

Build tooling modernized and CI configuration updated

The project has replaced the legacy Symfony CS fixer with PhpCsFixer, updating the configuration file from .php\_cs to .php\_cs.dist and adding a new psalm.xml for static analysis. Tool management now uses Phive to install php-cs-fixer, psalm, and phpunit, replacing the previous phpab-based autoloader with standard Composer dependencies (vendor/autoload.php). The build process (build.xml) and PHPUnit configuration (phpunit.xml) have been adjusted to reflect these changes, including updated bootstrap paths and test suite definitions.

(repo-wide) · high confidence

Test coverage

Added integration tests for version constraint parsing and compliance; Added unit tests for version constraint logic and SemVer parsing.

Dependencies

Package renamed to phar-io/version with PHP 7.2+ requirement

The package has been renamed from phar-io/manifest to phar-io/version, shifting its purpose from reading PHAR manifest information to handling version information and constraints. The minimum PHP version requirement has been raised from 5.6/7.0 to 7.2 or 8.0, and the dependency on the ext-phar extension has been removed. The branch alias configuration has also been removed.

(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 61.

Lenses

  • Code Health 100
  • Architecture 69
  • Maturity 49
  • Readiness 63
  • Security 90

Changes since last survey

  • 103 commits — 89 feature/other, 14 fixes

By area

  • (root) — 58 commits
  • tests/Unit — 12 commits
  • (repo) — 6 commits
  • src/PreReleaseSuffix.php — 6 commits
  • src/VersionConstraintParser.php — 6 commits
  • src/Version.php — 5 commits
  • src/constraints — 5 commits
  • src/InvalidVersionException.php — 3 commits
  • tests/Integration — 2 commits

Notable commits

  • fix: Add Version::getOriginalString(), Fixes #24
  • fix: Fix
  • fix: Fix CS/WS issues
  • fix: Fix broken test in VersionConstraintParserTest
  • fix: Fix missing name warning
  • fix: Fix tile operator handling
  • fix: Fix: Badge
  • fix: Fix: Build
  • fix: Merge pull request #19 from GuillaumeSeren/fix-18
  • fix: Revert "ensure phive updates itself"
  • fix: fix #11 by adding optional labels to the regular expression in VersionConstraintParser
  • fix: fix codestyle violations
  • fix: fix issue #28 (logical or syntax support both single and double pipe)
  • fix: fix path to bootstrap file in phpunit.xml
  • change: Add .gitattribute file with export-ignore rules for build/test files to reduce the dist zip file size
  • change: Add @throws
  • change: Add BuildMetaData support
  • change: Add Travis CI build status to README.md
  • change: Add pl to supported PreReleaseSuffix labels
  • change: Add description and examples to README.md #4
  • …and 83 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

phar-io/version 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 5eeb03f1ee82b3076d72daa5cb85d6b68abad783 — 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.