sebastianbergmann/exporter
71.6
Strong · 19 September 2026
1.1k
lines of production code
PHP
primary language
1
measurement over time
What this system is
This system is a PHP library for exporting values to human-readable strings, now renamed to sebastian/exporter and requiring PHP 8.4. It provides a customizable export mechanism via the ObjectExporter interface, allowing users to define custom logic for complex objects while safely handling recursion and nested structures. The library includes comprehensive test coverage for various data types and custom exporter chains, supported by modernized build tooling and automated release processes.
Features
Customizable object export via ObjectExporter interface
Users can now provide custom logic for how specific objects are converted to strings by implementing the new ObjectExporter interface and passing it to the Exporter constructor. The library introduces an ExportContext to track recursion and export state, ensuring that custom exporters can safely delegate nested value exports without causing infinite loops or duplicate references. A default ObjectExporterChain implementation is provided to manage multiple custom exporters, allowing users to define priority-based handling for complex or reflection-sensitive objects (such as protobuf messages) that previously caused issues like segfaults or incorrect output.
src · high confidence
Removals
Removal of PHPExporter library
The PHPExporter component, including the Exporter, ExporterContext, and ExporterException classes, has been removed from the codebase. This eliminates the utility previously used for generating textual representations of PHP values (similar to print\_r but with improved handling of nulls, booleans, and recursion) for users who relied on this specific export functionality.
src/PHPExporter · high confidence
Behavioural changes
142 commits (0 fixes) modifying tools
A change to existing behaviour in tools — 142 commits, 5 files.
tools · medium confidence · unverified
Automated release note extraction for tagged releases
A new build script, extract-release-notes.php, has been added to the build directory to support the automated creation of releases when a tag is pushed. This utility parses the project's ChangeLog.md file to extract the specific section corresponding to a given version tag, allowing the release process to automatically include the correct changelog entries without manual intervention.
build · high confidence
Modernized build tooling and configuration standards
The project has replaced legacy build and configuration files with modern equivalents: \phpunit.xml.dist\ is removed in favor of \phpunit.xml\, and \php-cs-fixer.php\ is replaced by \.php-cs-fixer.dist.php\. A new \.gitattributes\ file is introduced to control archive exports (excluding tests, tools, and build artifacts) and define diff drivers. The \LICENSE\ file is updated to the BSD 3-Clause format with a 2026 copyright year, and \README.md\ is rewritten to reflect the current \sebastian/exporter\ namespace and usage patterns.
(repo-wide) · high confidence
Test coverage
Added test coverage for Exporter and ObjectExporterChain; Added test fixtures for custom object exporters and enum types; Removed PHPExporter test suite.
Dependencies
Major version upgrade to 8.2 with PHP 8.4 requirement and dependency updates
The package has been renamed to sebastian/exporter and bumped to major version 8.2, requiring PHP 8.4 and the ext-mbstring extension. It now depends on sebastian/recursion-context ^8.0.1 and updates the dev dependency phpunit/phpunit to ^13.3.4. The composer.json also adds support metadata, configures platform optimization, and switches to classmap autoloading.
(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 development tooling, ensuring that code quality checks reflect the current standards of these libraries.
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 72.
Lenses
- Code Health 99
- Architecture 69
- Maturity 66
- Readiness 78
- Security 89
Changes since last survey
- 300 commits — 285 feature/other, 15 fixes
By area
- (root) — 101 commits
- src/Exporter.php — 45 commits
- .github/workflows — 44 commits
- tools/.phpstan — 40 commits
- (repo) — 28 commits
- tests/ExporterTest.php — 22 commits
- .phive/phars.xml — 8 commits
- tests/_fixture — 5 commits
- .github/FUNDING.yml — 2 commits
- src/exception — 2 commits
- .github/CODE_OF_CONDUCT.md — 1 commit
- .github/CONTRIBUTING.md — 1 commit
- .psalm/baseline.xml — 1 commit
Notable commits
- fix: Fix
- fix: Fix
- fix: Fix
- fix: Fix
- fix: Fix CS/WS issues
- fix: Fix CS/WS issues
- fix: Fix code coverage metadata
- fix: Fix package name
- fix: Fix version constraint
- fix: Revert "Make Exporter::toArray() private"
- fix: Revert "Refactor"
- fix: Revert "Remove the optional $indentation parameter of Exporter::export()"
- fix: Revert "Rename method"
- fix: Revert #56
- fix: fix: use ReflectionClass insteadof ReflectionObject
- 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: Accept any object exporter, not just a chain, in Exporter's constructor
- change: Add Liberapay and Tidelift
- change: Add documentation on how to contribute
- change: Add tests
- …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/exporter 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 7e269da761c5714d069904597c01023918898a02 — 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.