Skip to content

Commit 818e27b

Browse files
Closes #6446
1 parent 95fb0b1 commit 818e27b

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

ChangeLog-12.5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes of the PHPUnit 12.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
44

5+
## [12.5.4] - 2025-MM-DD
6+
7+
### Fixed
8+
9+
* [#6446](https://github.com/sebastianbergmann/phpunit/issues/6446): Test runner crashes with `Timer::start() has to be called before Timer::stop()`
10+
511
## [12.5.3] - 2025-12-11
612

713
### Changed
@@ -32,6 +38,7 @@ All notable changes of the PHPUnit 12.5 release series are documented in this fi
3238
* [#6380](https://github.com/sebastianbergmann/phpunit/pull/6380): Allow `Throwable` in `expectExceptionObject()`
3339
* A PHPUnit notice is now emitted for test methods that create a mock object but do not configure an expectation for it
3440

41+
[12.5.4]: https://github.com/sebastianbergmann/phpunit/compare/12.5.3...12.5
3542
[12.5.3]: https://github.com/sebastianbergmann/phpunit/compare/12.5.2...12.5.3
3643
[12.5.2]: https://github.com/sebastianbergmann/phpunit/compare/12.5.1...12.5.2
3744
[12.5.1]: https://github.com/sebastianbergmann/phpunit/compare/12.5.0...12.5.1

src/Runner/CodeCoverage.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ public function stop(bool $append, null|false|TargetCollection $covers = null, ?
213213
return;
214214
}
215215

216-
$time = $this->timer()->stop()->asSeconds();
217-
218-
$status = TestStatus::unknown();
216+
$time = $this->timer()->stop()->asSeconds();
217+
$status = TestStatus::unknown();
218+
$this->collecting = false;
219219

220220
if ($this->test !== null) {
221221
if ($this->test->status()->isSuccess()) {
@@ -257,8 +257,7 @@ public function stop(bool $append, null|false|TargetCollection $covers = null, ?
257257

258258
$this->codeCoverage->stop($append, $status, $covers, $uses, $time);
259259

260-
$this->test = null;
261-
$this->collecting = false;
260+
$this->test = null;
262261
}
263262

264263
public function deactivate(): void

0 commit comments

Comments
 (0)