|
29 | 29 | use React\EventLoop\LoopInterface; |
30 | 30 | use React\EventLoop\StreamSelectLoop; |
31 | 31 | use React\Http\Browser; |
32 | | -use React\Promise\CancellablePromiseInterface; |
33 | | -use React\Promise\ExtendedPromiseInterface; |
| 32 | +use React\Promise\PromiseInterface; |
34 | 33 | use React\Socket\ConnectionInterface; |
35 | 34 | use React\Socket\Connector; |
36 | 35 | use React\Socket\TcpServer; |
|
64 | 63 | class FixerApplication |
65 | 64 | { |
66 | 65 |
|
67 | | - /** @var (ExtendedPromiseInterface&CancellablePromiseInterface)|null */ |
68 | | - private $processInProgress; |
| 66 | + /** @var PromiseInterface<string>|null */ |
| 67 | + private PromiseInterface|null $processInProgress = null; |
69 | 68 |
|
70 | 69 | private bool $fileMonitorActive = true; |
71 | 70 |
|
@@ -348,7 +347,7 @@ private function downloadPhar( |
348 | 347 | throw new ShouldNotHappenException(sprintf('Could not open file %s for writing.', $pharPath)); |
349 | 348 | } |
350 | 349 | $progressBar = new ProgressBar($output); |
351 | | - $client->requestStreaming('GET', $latestInfo['url'])->done(static function (ResponseInterface $response) use ($progressBar, $pharPathResource): void { |
| 350 | + $client->requestStreaming('GET', $latestInfo['url'])->then(static function (ResponseInterface $response) use ($progressBar, $pharPathResource): void { |
352 | 351 | $body = $response->getBody(); |
353 | 352 | if (!$body instanceof ReadableStreamInterface) { |
354 | 353 | throw new ShouldNotHappenException(); |
@@ -470,7 +469,7 @@ private function analyse( |
470 | 469 | )); |
471 | 470 | $this->processInProgress = $process->run(); |
472 | 471 |
|
473 | | - $this->processInProgress->done(function () use ($server): void { |
| 472 | + $this->processInProgress->then(function () use ($server): void { |
474 | 473 | $this->processInProgress = null; |
475 | 474 | $server->close(); |
476 | 475 | }, function (Throwable $e) use ($server, $output, $phpstanFixerEncoder): void { |
|
0 commit comments