Skip to content

Commit

Permalink
bug #36935 [HttpClient] Adjust AmpResponse to the stricter trait hand…
Browse files Browse the repository at this point in the history
…ling in php 8 (derrabus)

This PR was merged into the 5.1 branch.

Discussion
----------

[HttpClient] Adjust AmpResponse to the stricter trait handling in php 8

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #36872
| License       | MIT
| Doc PR        | N/A

Follows #36908.

Commits
-------

e3aa78f [HttpClient] Adjust AmpResponse to the stricter trait handling in php 8.
  • Loading branch information
nicolas-grekas committed May 24, 2020
2 parents 6868f6c + e3aa78f commit 4488c30
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Symfony/Component/HttpClient/Response/AmpResponse.php
Expand Up @@ -25,6 +25,7 @@
use Symfony\Component\HttpClient\HttpClientTrait;
use Symfony\Component\HttpClient\Internal\AmpBody;
use Symfony\Component\HttpClient\Internal\AmpClientState;
use Symfony\Component\HttpClient\Internal\ClientState;
use Symfony\Contracts\HttpClient\ResponseInterface;

/**
Expand Down Expand Up @@ -143,8 +144,10 @@ private static function schedule(self $response, array &$runningResponses): void

/**
* {@inheritdoc}
*
* @param AmpClientState $multi
*/
private static function perform(AmpClientState $multi, array &$responses = null): void
private static function perform(ClientState $multi, array &$responses = null): void
{
if ($responses) {
foreach ($responses as $response) {
Expand All @@ -163,8 +166,10 @@ private static function perform(AmpClientState $multi, array &$responses = null)

/**
* {@inheritdoc}
*
* @param AmpClientState $multi
*/
private static function select(AmpClientState $multi, float $timeout): int
private static function select(ClientState $multi, float $timeout): int
{
$selected = 1;
$delay = Loop::delay(1000 * $timeout, static function () use (&$selected) {
Expand Down

0 comments on commit 4488c30

Please sign in to comment.