Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from May 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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