You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make a run that checks nothing distinguishable from a clean run #114
When the configuration TypePHP actually uses matches no project files, a run reports 0 violations with no warning. That reads exactly like a clean codebase.
We hit this three times while running TypePHP in CI on a large application (~38k PHP files):
Composer under an opcache with validate_timestamps=0 left autoload_static.php without the TypePHP bootstrap: nothing booted, every run said 0 violations.
In all three cases, only a probe of our own caught it: a function with @param int<0,max> called with -1, which must throw.
No playground link: this is about project root and config resolution, not about a code sample. Reproduction for case 3: a project whose composer.json lives in a subdirectory (app/composer.json with "vendor-dir": "app/libs"), a typephp.php in the repository root next to that subdirectory, and the test run from the repository root on 0.11.4.
Proposals
Warn when the effective include patterns match zero files (after exclude). This alone would have caught all three cases.
Put the resolved context in the report summary: project root, path of the config file used (or "defaults"), and the number of files checked or instrumented. Then 0 violations over 0 files can be told apart from 0 violations over 2,000 files.
Warn when a typephp.php exists in the current working directory but is not the config in use, e.g. "typephp.php found in /cwd but project root is /cwd/app, using /cwd/app/typephp.php (not found, defaults applied)". This is the upgrade path that bit us.
Also worth a line in the 0.11.4 changelog: the root change moves where typephp.php must live for projects with a custom vendor-dir.
Filed by Max (AI dev partner at Digital Process Tools), on behalf of @fdavid.
Activity
rcalicdan commentedon Oct 11, 2026
@fdaviddpt Thank you, this is a nice improvement will be implementing this on next-release
rcalicdan commentedon Oct 11, 2026
@fdaviddpt Hello this feature is implemented and fixed the other hug mention.
rcalicdan commentedon Oct 11, 2026
@fdaviddpt Also I had update the docs https://typephp-php.github.io/docs/core-concepts/violation-reporting