Upgrading phpunit/phpcov 12 to 13
Breaking12.0.0 → 13.2.1Breaking1Platform1New8Changed3Fixed2
BreakingUpgrade verdict
1 breaking change and a platform requirement change.
In plain terms
- The execute command is gone; use another way to run tests with coverage.
- You must upgrade to PHPUnit 13.1 and phpunit/php-code-coverage 14.0.
Must act 2 items need code or config changes
Drops phpunit/phpunit.
Moves phpunit/php-code-coverage ^13.0.1 → ^14.5.0, phpunit/php-file-iterator ^7.0.0 → ^7.0.2, sebastian/cli-parser ^5.0.0 → ^5.0.1, sebastian/diff ^8.0.0 → ^9.0.1, sebastian/version ^7.0.0 → ^7.0.1. Your build may pick other versions.
What you must change
Breaking1
Removes the "execute" command.
executePlatform1
Drops support for PHPUnit 13.0 and phpunit/php-code-coverage 13.0.
API changes
Generated by DepDelta from published PHP source. Not mixed with prose notes.
- removed:
abstract class Command - removed:
final class ExecuteCommand extends Command - removed:
final class PatchCoverage - removed:
method Arguments.addUncovered(): bool - removed:
method Arguments.configuration(): ?string - removed:
method Arguments.include(): array - removed:
method Arguments.pathCoverage(): bool - removed:
method Arguments.script(): ?string - removed:
method ExecuteCommand.run(Arguments $arguments): int - removed:
method PatchCoverage.execute(string $coverageFile, string $patchFile, string $pathPrefix): array - removed:
protected method Command.handleConfiguration(CodeCoverage $coverage, Arguments $arguments): void - removed:
protected method Command.handleReports(CodeCoverage $coverage, Arguments $arguments): void - changed:
constructor Arguments(?string $command, ?string $script, ?string $directory, ?string $coverage, ?string $patch, ?string $configuration, array $include, bool $pathCoverage, bool $addUncovered, ?string $clover, ?string $cobertura, ?string $crap4j, ?string $html, ?string $php, ?string $text, ?string $xml, ?string $pathPrefix, bool $help, bool $version) → constructor Arguments(?string $command, ?string $directory, ?string $coverage, ?string $patch, ?string $clover, ?string $openClover, ?string $cobertura, ?string $crap4j, ?string $html, Views $htmlViews, ?string $jsonl, ?string $php, ?string $source, ?string $text, ?string $xml, ?string $pathPrefix, bool $requireMatchingGitInformation, bool $requireMatchingPhpVersion, bool $requireMatchingCodeCove… - changed:
final class HelpCommand extends Command → final class HelpCommand implements Command - changed:
final class MergeCommand extends Command → final class MergeCommand implements Command - changed:
final class PatchCoverageCommand extends Command → final class PatchCoverageCommand implements Command - added:
constructor InvalidHtmlViewsException(string $value) - added:
final class InvalidHtmlViewsException extends RuntimeException implements Exception - added:
final class PatchCoverageCalculator - added:
interface Command - added:
method Arguments.htmlViews(): Views - added:
method Arguments.jsonl(): ?string - added:
method Arguments.openClover(): ?string - added:
method Arguments.requireMatchingCodeCoverageDriver(): bool - added:
method Arguments.requireMatchingGitInformation(): bool - added:
method Arguments.requireMatchingPhpVersion(): bool - added:
method Arguments.source(): ?string - added:
method PatchCoverageCalculator.calculate(array $lineCoverage, array $patch, string $basePath, string $pathPrefix): array - added:
static method Application.version(): string