Skip to content

Commit 27614ab

Browse files
committed
Remove code for older Symfony versions
1 parent 9d7f357 commit 27614ab

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/Process/Process.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -214,20 +214,9 @@ public function start(callable $callback = null, array $env = []): void
214214
$this->executionTime = 0;
215215
}
216216

217-
public function getStartTime(): float
218-
{
219-
// Before symfony/process 5.1, getStartTime() does not exist but $this->starttime already exists and is private
220-
try {
221-
$return = parent::getStartTime();
222-
} catch (\Throwable $exception) {
223-
$return = $this->getParentPrivatePropertyValue('starttime');
224-
}
225-
226-
return $return;
227-
}
228-
229217
protected function updateStatus(bool $blocking): void
230218
{
219+
// Do not call getStatuts() here to get the status, or it will call updateStatus() and do an infinite loop
231220
if ($this->isStarted() && $this->getParentPrivatePropertyValue('status') !== static::STATUS_TERMINATED) {
232221
$this->executionTime = (int) ((microtime(true) - $this->getStartTime()) * 1000);
233222
}

0 commit comments

Comments
 (0)