phpunit/php-code-coverage
Library that provides collection, processing, and rendering functionality for PHP code coverage information.
14.3.1
964M downloads/mo
#48 most downloaded on composer
sebastianbergmann/php-code-coverage
What this package is like to depend on
Last release 7 days ago
16 Aug 2026
Ships fairly regularly
a new release about every 2 weeks
Rarely documented
notes for 10 of 249 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
249 releases · first in 2012
37 releases in the last 12 months
see the full history below
Release timeline
248 releases · Sep 2012 to Aug 2026Releases
latest 60 of 249-
14.3.116 Aug 2026Release notes
Open source →Changed
- The test size filter of the HTML report now disables the buttons for test sizes that have no coverage data
- The test size filter of the HTML report is no longer rendered when the coverage data has no test sizes at all
-
14.3.007 Aug 2026Release notes
Open source →Added
- #1140: Class-oriented HTML report
- #1141: Improve visualization of branch coverage and path coverage in the HTML report
- #1153: Filter HTML code coverage report by test size
- #1210: Filesystem-based targeting
- #1231: Identify dead code using static analysis
- Record how often a test executed a line or traversed a branch or path (the
<covered>elements of the XML report now have acountattribute; drivers that do not collect hit counts report1)
Changed
- #1259: Degrade gracefully when a source file cannot be parsed
- The HTML report no longer depends on Bootstrap and jQuery; its markup, stylesheet, and JavaScript have been rewritten
- The headline coverage figures of a directory, file, namespace, or class are now shown above its coverage table instead of in a
Totalrow - The dashboard shows the bubble chart and the CRAP index table side by side, for classes as well as for methods
- The CSS custom properties that carry the configured colors were renamed from
--phpunit-*to--coverage-*; custom CSS files that use these, or that use Bootstrap's--bs-*custom properties, need to be updated SebastianBergmann\CodeCoverage\Report\Html\Colors::default()now uses#eef1f5and#22272efor the breadcrumb colors instead ofvar(--bs-gray-200)andvar(--bs-gray-800)- The file listing of a directory no longer links directly to the branch and path coverage views of a file; these are reachable through the tabs on the file's own page
- The serialization format for
.covfiles was bumped from version 1 to version 2; files serialized with previous versions cannot be loaded or merged any more
Fixed
- #1258: Coverage of less than 100% can be displayed as 100.00% due to rounding
-
14.2.430 Jul 2026Release notes
Open source →- Source files were parsed repeatedly instead of read from the static analysis result cache, which made runs with path coverage enabled appear to hang
-
14.2.306 Jul 2026 -
14.2.208 Jun 2026Release notes
Open source →Fixed
- #1230: Short-form property hook bodies wrongly classified as executable
-
14.2.107 Jun 2026 -
14.2.005 Jun 2026Release notes
Open source →Added
SebastianBergmann\CodeCoverage\Driver\Granularityenumeration withLine,LineAndBranch, andLineBranchAndPathcasesSebastianBergmann\CodeCoverage\Driver\Selector::driver(Filter, Granularity)for selecting a driver by required granularitySebastianBergmann\CodeCoverage\NoSupportedDriverAvailableExceptionthrown when no driver supports the requested granularity
Changed
- #1186:
Merger::merge()now accepts any kind of iterable - Reduced overhead in static analysis
- The HTML report now distinguishes three rendering modes (line, line + branch, line + branch + path) so that a driver providing branch coverage without path coverage no longer forces path-coverage UI to appear with empty data
- The Text report now gates the
Branches:andPaths:lines on the presence of the corresponding data independently - Various internal refactorings to improve code readability
Deprecated
SebastianBergmann\CodeCoverage\Driver\Selector::forLineCoverage(), useSelector::select()withGranularity::LineinsteadSebastianBergmann\CodeCoverage\Driver\Selector::forLineAndPathCoverage(), useSelector::select()withGranularity::LineBranchAndPathinsteadSebastianBergmann\CodeCoverage\CodeCoverage::enableBranchAndPathCoverage(), useSelector::select()withGranularity::LineBranchAndPathinsteadSebastianBergmann\CodeCoverage\CodeCoverage::disableBranchAndPathCoverage(), useSelector::select()withGranularity::LineinsteadSebastianBergmann\CodeCoverage\CodeCoverage::collectsBranchAndPathCoverage()SebastianBergmann\CodeCoverage\BranchAndPathCoverageNotSupportedException, replaced byBranchCoverageNotSupportedExceptionandPathCoverageNotSupportedException
Fixed
- #1159: Statements inside a closure passed as a call argument are incorrectly reported as not covered
-
14.1.1001 Jun 2026 -
14.1.916 May 2026Release notes
Open source →Fixed
- #1160: Ternary inside array spread: else-arm's line is falsely reported as not covered
-
14.1.809 May 2026Nothing published for this version
-
14.1.704 May 2026Nothing published for this version
-
14.1.624 Apr 2026Nothing published for this version
-
14.1.524 Apr 2026Nothing published for this version
-
14.1.423 Apr 2026Nothing published for this version
-
14.1.318 Apr 2026Nothing published for this version
-
14.1.215 Apr 2026Nothing published for this version
-
14.1.113 Apr 2026Nothing published for this version
-
14.1.012 Apr 2026Nothing published for this version
-
14.0.003 Apr 2026Nothing published for this version
-
13.0.201 Apr 2026Nothing published for this version
-
13.0.106 Feb 2026Nothing published for this version
-
13.0.006 Feb 2026Nothing published for this version
-
12.5.701 Jun 2026 -
12.5.615 Apr 2026Nothing published for this version
-
12.5.513 Apr 2026Nothing published for this version
-
12.5.412 Apr 2026Nothing published for this version
-
12.5.306 Feb 2026Nothing published for this version
-
12.5.224 Dec 2025Nothing published for this version
-
12.5.108 Dec 2025Nothing published for this version
-
12.5.029 Nov 2025Nothing published for this version
-
12.4.024 Sep 2025Nothing published for this version
-
12.3.817 Sep 2025Nothing published for this version
-
12.3.710 Sep 2025Nothing published for this version
-
12.3.602 Sep 2025Nothing published for this version
-
12.3.501 Sep 2025Nothing published for this version
-
12.3.429 Aug 2025Nothing published for this version
-
12.3.327 Aug 2025Nothing published for this version
-
12.3.229 Jul 2025Nothing published for this version
-
12.3.118 Jun 2025Nothing published for this version
-
12.3.023 May 2025Nothing published for this version
-
12.2.104 May 2025Nothing published for this version
-
12.2.003 May 2025Nothing published for this version
-
12.1.203 Apr 2025Nothing published for this version
-
12.1.103 Apr 2025Nothing published for this version
-
12.1.017 Mar 2025Nothing published for this version
-
12.0.515 Mar 2025Nothing published for this version
-
12.0.425 Feb 2025Nothing published for this version
-
12.0.318 Feb 2025Nothing published for this version
-
12.0.208 Feb 2025Nothing published for this version
-
12.0.107 Feb 2025Nothing published for this version
-
12.0.007 Feb 2025Nothing published for this version
-
11.0.1224 Dec 2025Nothing published for this version
-
11.0.1127 Aug 2025Nothing published for this version
-
11.0.1018 Jun 2025Nothing published for this version
-
11.0.925 Feb 2025Nothing published for this version
-
11.0.811 Dec 2024Nothing published for this version
-
11.0.709 Oct 2024Nothing published for this version
-
11.0.622 Aug 2024Nothing published for this version
-
11.0.503 Jul 2024Nothing published for this version
-
11.0.429 Jun 2024Nothing published for this version