sebastianbergmann/version
61.5
Weak · 19 September 2026
489
lines of production code
PHP
primary language
1
measurement over time
What this system is
This system is a PHP library designed for semantic version detection and string representation. It retrieves version information from Git repositories using safe process execution and strict typing. The project focuses on modern PHP standards, requiring PHP 8.4 and utilizing PHPStan for static analysis.
Behavioural changes
Library renamed to sebastian/version and API method renamed to asString()
The library has been renamed to sebastian/version and is now installed exclusively via Composer, with PEAR support removed. The public API method getVersion() has been renamed to asString(), and the README has been updated to reflect the new namespace and usage. Additionally, the project has switched from Psalm to PHPStan for static analysis, introduced a comprehensive PHP-CS-Fixer configuration, and added automated dependency updates via Renovate.
(repo-wide) · high confidence
Phive binary added to version control and PHPStan configured as the static analysis tool
The project now manages the Phive binary directly in the repository (tools/phive) and uses it to install PHPStan, which replaces Psalm as the static analysis tool. A symlink (tools/phpstan) points to the installed PHPStan binary, and the configuration includes strict rules and type-coverage extensions to improve code quality checks.
tools · high confidence
Refactored version detection to use proc\_open and strict typing
The version detection logic in src/Version.php has been rewritten to use strict types, readonly classes, and proc\_open instead of exec for safer and more reliable Git information retrieval. The manual autoload file src/autoload.php has been removed, as the class is now part of the standard namespace and likely handled by Composer. Users will see improved type safety and potentially different behavior in how Git tags are parsed, with a focus on avoiding shell spawning and ensuring the path is strictly checked for a .git directory.
src · high confidence
Removal of legacy build tooling and configuration files
The build directory has been cleaned up by removing several obsolete configuration and tooling files, including the PEAR package manifest (package.xml), documentation generation config (phpdox.xml), code quality rulesets (phpmd.xml, PHPCS ruleset.xml and associated sniffs), and the PHPUnit configuration (phpunit.xml). A new PHP script (extract-release-notes.php) has been added to the build/scripts directory to extract release notes from the ChangeLog.md file based on a provided version tag.
build · high confidence
Test coverage
Removed test bootstrap file
The test bootstrap file (tests/bootstrap.php) has been removed. This file previously handled the autoloading of the source code for the test suite by requiring the main autoload script.
tests · high confidence
Dependencies
PHP 8.4 requirement and PHPStan tooling isolation
The project now requires PHP 8.4 or higher, dropping support for older PHP versions, and introduces a dedicated \tools/.phpstan\ directory to manage static analysis dependencies (PHPStan 2.2.14, strict-rules, and extension-installer) separately from the main application. The main \composer.json\ also adds a security policy link and configures the autoloader for optimized performance.
(dependencies) · high confidence
Updated PHPStan static analysis tooling to version 2.2.14
The \tools/.phpstan\ directory has been updated to use PHPStan version 2.2.14, along with \phpstan-strict-rules\ 2.0.12 and \ergebnis/phpstan-rules\ 2.13.1. This update brings the latest static analysis capabilities and rule sets to the project's local development environment, ensuring code quality checks remain current with the PHPStan 2.x ecosystem.
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 62.
Lenses
- Code Health 100
- Architecture 69
- Maturity 62
- Readiness 51
- Security 88
Changes since last survey
- 253 commits — 240 feature/other, 13 fixes
By area
- (root) — 73 commits
- .phive/phars.xml — 50 commits
- tools/.phpstan — 40 commits
- .github/workflows — 33 commits
- (repo) — 23 commits
- src/Version.php — 23 commits
- .github/FUNDING.yml — 4 commits
- .github/stale.yml — 2 commits
- .psalm/baseline.xml — 2 commits
- .github/CODE_OF_CONDUCT.md — 1 commit
- .github/CONTRIBUTING.md — 1 commit
- build/PHPCS — 1 commit
Notable commits
- fix: Fix
- fix: Fix CS/WS issue
- fix: Fix CS/WS issues
- fix: Fix CS/WS issues
- fix: Fix CS/WS issues
- fix: Fix CS/WS issues
- fix: Fix CS/WS issues
- fix: Fix for Windows
- fix: Fix issue identified by PHPStan
- fix: Fix name
- fix: Fix package name
- fix: Merge pull request #11 from bacinsky/hotfix/undefined_returncode
- fix: Updated Version::getGitInformation(), fixed undefined returnCode on exec() fail
- 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 badge
- change: Add configuration for probot-stale
- change: Add documentation on how to contribute
- change: Add link to security policy
- …and 233 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/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 48f571981c99ba9761111545186e1175d7f40b86 — 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.