Upgrading phpunit/php-code-coverage 11 to 12
Breaking11.0.12 → 12.5.8Breaking3Platform1New5Changed21Fixed18
BreakingUpgrade verdict
3 breaking changes and a platform requirement change.
In plain terms
- The method that reported whether dead code detection was enabled has been removed, so any code calling it will break.
- These methods no longer accept the optional list of lines to be used, so callers passing it must stop doing so.
- If you call these methods to set coverage targets, you must now pass a TargetCollection object rather than a plain array.
- You can no longer use this package on PHP 8.2 and must upgrade your PHP runtime.
Must act 4 items need code or config changes
PHP requirement changed in 12.0.0: >=8.2 → >=8.3.
What you must change
Breaking3
Removes the CodeCoverage::detectsDeadCode() method.
CodeCoverage::detectsDeadCode()Removes the optional $linesToBeUsed argument of CodeCoverage::stop() and CodeCoverage::append().
CodeCoverage::stop()CodeCoverage::append()$linesToBeUsedCodeCoverage::stop() and CodeCoverage::append() now expect a TargetCollection instead of an array to configure code coverage targets.
CodeCoverage::stop()CodeCoverage::append()TargetCollectionPlatform1
Drops support for PHP 8.2; this component is no longer supported on that version.