tomasvotruba/type-coverage
Measure type coverage of your project
2.3.4
13M downloads/mo
#648 most downloaded on Packagist
TomasVotruba/type-coverage
What this package is like to depend on
Last release 5 days ago
18 Aug 2026
Ships unpredictably
gaps range from 2 weeks to 11 months
Rarely documented
notes for 10 of 51 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
51 releases · first in 2022
9 releases in the last 12 months
see the full history below
Release timeline
51 releases · Dec 2022 to Aug 2026Releases
latest 51-
2.3.418 Aug 2026 -
2.3.318 Aug 2026 -
2.3.217 Aug 2026 -
2.3.117 Aug 2026 -
2.3.029 Jul 2026Release notes
Open source →Type Perfect rules are now part of this package
rector/type-perfect has been merged into
tomasvotruba/type-coverage(#68). Its rules live inpackages/type-perfectand keep theRector\TypePerfect\namespace, so existingignoreErrorspatterns still match.The extension is registered automatically via
phpstan/extension-installer— no extraincludesneeded.If you use both packages, drop
rector/type-perfectfromcomposer.jsonto avoid duplicate rules:"require-dev": { "tomasvotruba/type-coverage": "^2.3", - "rector/type-perfect": "^2.1" }All Type Perfect rules are opt-in
Four rules used to report right after install, with no way off short of
ignoreErrors. They now match the rest of the set — off by default, one parameter each (#69):parameters: type_perfect: narrow_param: false narrow_return: false no_mixed: false null_over_false: false + no_param_type_removal: false + no_array_access_on_object: false + no_isset_on_object: false + no_empty_on_object: falseEnable what you want:
parameters: type_perfect: narrow_param: true narrow_return: true no_mixed_property: true no_mixed_caller: true null_over_false: true no_param_type_removal: true no_array_access_on_object: true no_isset_on_object: true no_empty_on_object: true
What each of those 4 catches:
// no_isset_on_object / no_empty_on_object if (isset($object->property)) { } // bad - hides typos and nulls if ($object->property !== null) { } // good // no_array_access_on_object $object['key']; // bad $object->getKey(); // good // no_param_type_removal public function run(string $name) // parent public function run($name) // bad - child drops the type
Type coverage checks are unchanged
return_type,param_type,property_typeandconstant_typebehave exactly as in 2.2.2 — upgrading adds rules, it does not change existing measurements.Housekeeping
symfony/dom-crawlerbumped to^8.1(dev only) (#70)
Full Changelog: 2.2.2...2.3.0
-
2.2.207 Jun 2026 -
2.2.126 May 2026 -
2.2.025 May 2026 -
2.1.005 Dec 2025Release notes
Open source → -
2.0.207 Jan 2025 -
2.0.126 Dec 2024Nothing published for this version
-
2.0.012 Dec 2024Nothing published for this version
-
1.0.001 Oct 2024Nothing published for this version
-
0.3.114 Jun 2024Nothing published for this version
-
0.3.020 May 2024Nothing published for this version
-
0.2.826 Apr 2024Nothing published for this version
-
0.2.716 Apr 2024Nothing published for this version
-
0.2.616 Apr 2024Nothing published for this version
-
0.2.516 Mar 2024Nothing published for this version
-
0.2.415 Mar 2024Nothing published for this version
-
0.2.308 Mar 2024Nothing published for this version
-
0.2.215 Dec 2023Nothing published for this version
-
0.2.127 Aug 2023Nothing published for this version
-
0.2.019 May 2023Nothing published for this version
-
0.1.330 Mar 2023Nothing published for this version
-
0.1.230 Mar 2023Nothing published for this version
-
0.1.117 Mar 2023Nothing published for this version
-
0.1.012 Mar 2023Nothing published for this version
-
0.0.1217 Mar 2023Nothing published for this version
-
0.0.1112 Mar 2023Nothing published for this version
-
0.0.1027 Feb 2023Nothing published for this version
-
0.0.912 Jan 2023Nothing published for this version
-
0.0.829 Dec 2022Nothing published for this version
-
0.0.729 Dec 2022Nothing published for this version
-
0.0.629 Dec 2022Nothing published for this version
-
0.0.523 Dec 2022Nothing published for this version
-
0.0.423 Dec 2022Nothing published for this version
-
0.0.323 Dec 2022Nothing published for this version
-
0.0.223 Dec 2022Nothing published for this version
-
0.0.119 Dec 2022Nothing published for this version
-
0.1.0.7212 Mar 2023Nothing published for this version
-
0.0.9.7212 Jan 2023Nothing published for this version
-
0.0.8.7211 Jan 2023Nothing published for this version
-
0.0.7.7229 Dec 2022Nothing published for this version
-
0.0.5.7223 Dec 2022Nothing published for this version
-
0.0.4.7223 Dec 2022Nothing published for this version
-
0.0.3.7223 Dec 2022Nothing published for this version
-
0.0.2.7223 Dec 2022Nothing published for this version
-
0.0.11.7212 Mar 2023Nothing published for this version
-
0.0.10.7227 Feb 2023Nothing published for this version
-
0.0.1.7219 Dec 2022Nothing published for this version