sebastianbergmann/php-file-iterator
59.9
Adequate · 26 September 2026
772
lines of production code
PHP
primary language
4
measurements over time
What this system is
This system is a PHP library focused on file system iteration and filtering, providing utilities to traverse directories while handling hidden files, wildcards, and exclusions. It includes a refactored iterator implementation with a facade for simplified access and robust error handling for unreadable paths. The project emphasizes code quality through strict static analysis with PHPStan and comprehensive unit testing, alongside automated release workflows.
Removals
Removal of File\_Iterator class
The File\_Iterator class, which filtered files based on specified prefixes and suffixes, has been removed from the codebase. This eliminates the ability to use this specific iterator for file selection in tests or other processes relying on it.
File · high confidence
Behavioural changes
132 commits (0 fixes) modifying tools
A change to existing behaviour in tools — 132 commits, 4 files.
tools · medium confidence · unverified
Automated release note extraction for tagged releases
A new build script (build/scripts/extract-release-notes.php) has been added to support the 'Create release when tag is pushed' workflow. This tool parses the project's ChangeLog.md file to automatically extract the release notes corresponding to a specific version tag, enabling automated release creation processes.
build · high confidence
New file-iterator implementation with hidden-file and wildcard support
The src directory now contains a complete rewrite of the file-iteration logic, introducing new classes: ExcludeIterator, Facade, Factory, and Iterator. ExcludeIterator prunes hidden directories (those starting with a dot) from traversal while still accepting hidden files, and respects user-specified exclude paths. Factory resolves wildcard patterns (including \\ globstar syntax) and builds the iterator chain, handling unreadable directories gracefully. Iterator filters files by configurable prefixes and suffixes. Facade provides a simple entry point to retrieve a sorted, unique list of file paths matching the criteria.
src · high confidence
Repository maintenance and build configuration updates
This release introduces several repository-level improvements: a new .gitattributes file ensures that build artifacts, tests, and configuration files are excluded from archive exports; a .gitignore file is added to ignore local IDE and cache directories; the PHP-CS-Fixer configuration is updated with stricter formatting rules; the PHPUnit configuration is updated to enforce stricter testing standards; and the PEAR package.xml file is removed, indicating the end of PEAR distribution support.
(repo-wide) · high confidence
Test coverage
Added tests for file iterator edge cases and exclusion logic
Added unit tests for the file iterator facade and factory to verify correct behavior when handling directory exclusions (including prefix-based exclusions and trailing slashes), glob patterns, hidden directories, unopenable directories, and directories with names that cannot be matched by glob patterns.
tests · high confidence
Dependencies
PHPStan static analysis tooling upgraded to version 2.2.16 with strict rules
The local PHP development environment now uses PHPStan 2.2.16, upgraded from previous versions, alongside phpstan-strict-rules 2.0.12 and ergebnis/phpstan-rules 2.14.0. This update brings stricter static analysis capabilities to the codebase, ensuring higher code quality and catching more potential issues during development.
tools/.phpstan · high confidence
Update development dependencies and tooling configuration
The project's \composer.json\ has been updated to require PHP 8.4 or higher and upgraded \phpunit/phpunit\ to version 13.3.5. Additionally, the PHPStan tooling configuration in \tools/.phpstan/composer.json\ now specifies \phpstan/phpstan\ version 2.2.16, along with \phpstan/extension-installer\ 1.4.3, \phpstan/phpstan-strict-rules\ 2.0.12, and \ergebnis/phpstan-rules\ 2.14.0.
(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
Score
- CAI 45 → 60 (+14.8)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 35 → 41 (+5.7)
- Readiness 32 → 78 (+45.9)
- Security 81 → 88 (+6.3)
Resolved (6)
- Coverage not measured — test suite did not build
- Dimension evaluation failed
- No exposed public API
- No tests found
- Test reliability not included
- The README is a Composer metadata file for the phar package; there is no usage example showing how to instantiate or iterate over files. (README.md)
New (3)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Facade.getFilesAsArray is a thin wrapper around Factory.getFileIterator that consumes the iterator and returns an array. While the signatures are identical, the existence of both methods creates a choice between getting an Iterator (lazy) or an Array (eager) for the exact same input parameters, which can be confusing regarding performance implications.
Changes since last survey
- 35 commits — 34 feature/other, 1 fixes
By area
- (root) — 13 commits
- tools/.phpstan — 12 commits
- (repo) — 4 commits
- .github/workflows — 2 commits
- src/ExcludeIterator.php — 2 commits
- src/Factory.php — 1 commit
- tests/unit — 1 commit
Notable commits
- fix: Do not traverse hidden directories only to discard their contents (and fix some bugs along the way)
- change: Do not abort a traversal because of a directory that cannot be opened
- change: Do not depend on tomasvotruba/type-coverage
- change: Do not exclude paths that only share a prefix with an excluded directory
- change: Do not perform lock-file maintenance
- change: Improve test coverage for Factory
- change: Merge branch '6.0'
- change: Merge branch '6.0'
- change: Merge branch '6.0'
- change: Merge branch '6.0'
- change: Prepare release
- change: Prepare release
- change: Prepare release
- change: Specify generic types for RecursiveFilterIterator
- change: Update ChangeLog
- change: Update ChangeLog
- change: Update PHPStan packages
- change: Update codecov/codecov-action action to v7.1.0
- change: Update codecov/codecov-action action to v7.1.1
- change: Update dependency phpstan/phpstan to ^2.2.10
- …and 15 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/php-file-iterator 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 26 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 eb8600c22d03fa591a7a15092a042ed3e7fbfc82 — 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-a15879f6f801.