Skip to content

Commit 13189ef

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: [Console] Fix division by 0 error [ErrorHandler] Fix error message with PHP 8.5 add test covering associated entities referenced by their primary key Add an experimental CI job for PHP 8.5 Fix change log to mentioned thrown exception [HttpClient] Always set CURLOPT_CUSTOMREQUEST to the correct HTTP method in CurlHttpClient evaluate access flags for properties with asymmetric visibility [Mime] Fix wrong PHPDoc in `FormDataPart` constructor
2 parents 23c8aae + d205904 commit 13189ef

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Helper/ProgressBar.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public function getEstimated(): float
229229

230230
public function getRemaining(): float
231231
{
232-
if (!$this->step) {
232+
if (0 === $this->step || $this->step === $this->startingStep) {
233233
return 0;
234234
}
235235

Tests/Helper/ProgressBarTest.php

+8
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ public function testRegularTimeEstimation()
110110
);
111111
}
112112

113+
public function testRegularTimeRemainingWithDifferentStartAtAndCustomDisplay()
114+
{
115+
ProgressBar::setFormatDefinition('custom', ' %current%/%max% [%bar%] %percent:3s%% %remaining% %estimated%');
116+
$bar = new ProgressBar($output = $this->getOutputStream(), 1_200, 0);
117+
$bar->setFormat('custom');
118+
$bar->start(1_200, 600);
119+
}
120+
113121
public function testResumedTimeEstimation()
114122
{
115123
$bar = new ProgressBar($output = $this->getOutputStream(), 1_200, 0);

0 commit comments

Comments
 (0)