diff --git a/AmpHttpClient.php b/AmpHttpClient.php index 0e945b6..1439af2 100644 --- a/AmpHttpClient.php +++ b/AmpHttpClient.php @@ -43,7 +43,7 @@ final class AmpHttpClient implements HttpClientInterface, LoggerAwareInterface, use LoggerAwareTrait; private array $defaultOptions = self::OPTIONS_DEFAULTS; - private AmpClientState $multi; + private $multi; /** * @param array $defaultOptions Default requests' options diff --git a/CachingHttpClient.php b/CachingHttpClient.php index b2d8156..0271fda 100644 --- a/CachingHttpClient.php +++ b/CachingHttpClient.php @@ -35,8 +35,8 @@ class CachingHttpClient implements HttpClientInterface, ResetInterface { use HttpClientTrait; - private HttpClientInterface $client; - private HttpCache $cache; + private $client; + private $cache; private array $defaultOptions = self::OPTIONS_DEFAULTS; public function __construct(HttpClientInterface $client, StoreInterface $store, array $defaultOptions = []) diff --git a/CurlHttpClient.php b/CurlHttpClient.php index 86b8f9c..d5e0668 100644 --- a/CurlHttpClient.php +++ b/CurlHttpClient.php @@ -48,7 +48,7 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface, /** * An internal object to share state between the client and its responses. */ - private CurlClientState $multi; + private $multi; private static array $curlVersion; diff --git a/DecoratorTrait.php b/DecoratorTrait.php index 45a90e5..a08b725 100644 --- a/DecoratorTrait.php +++ b/DecoratorTrait.php @@ -23,7 +23,7 @@ */ trait DecoratorTrait { - private HttpClientInterface $client; + private $client; public function __construct(HttpClientInterface $client = null) { diff --git a/Exception/HttpExceptionTrait.php b/Exception/HttpExceptionTrait.php index f44ecd1..7ab2752 100644 --- a/Exception/HttpExceptionTrait.php +++ b/Exception/HttpExceptionTrait.php @@ -20,7 +20,7 @@ */ trait HttpExceptionTrait { - private ResponseInterface $response; + private $response; public function __construct(ResponseInterface $response) { diff --git a/HttplugClient.php b/HttplugClient.php index 8abdc66..2987710 100644 --- a/HttplugClient.php +++ b/HttplugClient.php @@ -58,16 +58,16 @@ */ final class HttplugClient implements HttplugInterface, HttpAsyncClient, RequestFactory, StreamFactory, UriFactory, ResetInterface { - private HttpClientInterface $client; - private ResponseFactoryInterface $responseFactory; - private StreamFactoryInterface $streamFactory; + private $client; + private $responseFactory; + private $streamFactory; /** * @var \SplObjectStorage|null */ private ?\SplObjectStorage $promisePool; - private HttplugWaitLoop $waitLoop; + private $waitLoop; public function __construct(HttpClientInterface $client = null, ResponseFactoryInterface $responseFactory = null, StreamFactoryInterface $streamFactory = null) { diff --git a/Internal/AmpBody.php b/Internal/AmpBody.php index bd995e1..a6ff763 100644 --- a/Internal/AmpBody.php +++ b/Internal/AmpBody.php @@ -25,7 +25,7 @@ */ class AmpBody implements RequestBody, InputStream { - private ResourceInputStream|\Closure|string $body; + private $body; private array $info; private \Closure $onProgress; private ?int $offset = 0; diff --git a/Internal/AmpClientState.php b/Internal/AmpClientState.php index 83bbca7..28906e6 100644 --- a/Internal/AmpClientState.php +++ b/Internal/AmpClientState.php @@ -49,7 +49,7 @@ final class AmpClientState extends ClientState private \Closure $clientConfigurator; private int $maxHostConnections; private int $maxPendingPushes; - private ?LoggerInterface $logger; + private $logger; public function __construct(?callable $clientConfigurator, int $maxHostConnections, int $maxPendingPushes, ?LoggerInterface &$logger) { diff --git a/Internal/CurlClientState.php b/Internal/CurlClientState.php index a0ef5ad..85153c1 100644 --- a/Internal/CurlClientState.php +++ b/Internal/CurlClientState.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpClient\Internal; -use Psr\Log\LoggerInterface; /** * Internal representation of the cURL client's state. @@ -25,11 +24,11 @@ final class CurlClientState extends ClientState public \CurlMultiHandle $handle; /** @var PushedResponse[] */ public array $pushedResponses = []; - public DnsCache $dnsCache; + public $dnsCache; /** @var float[] */ public array $pauseExpiries = []; public int $execCounter = \PHP_INT_MIN; - public ?LoggerInterface $logger = null; + public $logger = null; public function __construct() { diff --git a/Internal/HttplugWaitLoop.php b/Internal/HttplugWaitLoop.php index b86417b..10ff3d5 100644 --- a/Internal/HttplugWaitLoop.php +++ b/Internal/HttplugWaitLoop.php @@ -30,10 +30,10 @@ */ final class HttplugWaitLoop { - private HttpClientInterface $client; + private $client; private ?\SplObjectStorage $promisePool; - private ResponseFactoryInterface $responseFactory; - private StreamFactoryInterface $streamFactory; + private $responseFactory; + private $streamFactory; /** * @param \SplObjectStorage|null $promisePool diff --git a/Internal/PushedResponse.php b/Internal/PushedResponse.php index f1e0ad6..51c94e9 100644 --- a/Internal/PushedResponse.php +++ b/Internal/PushedResponse.php @@ -22,7 +22,7 @@ */ final class PushedResponse { - public CurlResponse $response; + public $response; /** @var string[] */ public array $requestHeaders; diff --git a/MockHttpClient.php b/MockHttpClient.php index 8550041..ecb2423 100644 --- a/MockHttpClient.php +++ b/MockHttpClient.php @@ -28,7 +28,7 @@ class MockHttpClient implements HttpClientInterface, ResetInterface { use HttpClientTrait; - private ResponseInterface|\Closure|iterable|null $responseFactory; + private $responseFactory; private int $requestsCount = 0; private array $defaultOptions = []; diff --git a/NativeHttpClient.php b/NativeHttpClient.php index 30f4caa..cf3e303 100644 --- a/NativeHttpClient.php +++ b/NativeHttpClient.php @@ -37,7 +37,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac use LoggerAwareTrait; private array $defaultOptions = self::OPTIONS_DEFAULTS; - private NativeClientState $multi; + private $multi; /** * @param array $defaultOptions Default request's options diff --git a/NoPrivateNetworkHttpClient.php b/NoPrivateNetworkHttpClient.php index 9185dd3..d3ea5ad 100644 --- a/NoPrivateNetworkHttpClient.php +++ b/NoPrivateNetworkHttpClient.php @@ -45,7 +45,7 @@ final class NoPrivateNetworkHttpClient implements HttpClientInterface, LoggerAwa '::/128', ]; - private HttpClientInterface $client; + private $client; private string|array|null $subnets; /** diff --git a/Psr18Client.php b/Psr18Client.php index aa71360..64898ed 100644 --- a/Psr18Client.php +++ b/Psr18Client.php @@ -52,9 +52,9 @@ */ final class Psr18Client implements ClientInterface, RequestFactoryInterface, StreamFactoryInterface, UriFactoryInterface, ResetInterface { - private HttpClientInterface $client; - private ResponseFactoryInterface $responseFactory; - private StreamFactoryInterface $streamFactory; + private $client; + private $responseFactory; + private $streamFactory; public function __construct(HttpClientInterface $client = null, ResponseFactoryInterface $responseFactory = null, StreamFactoryInterface $streamFactory = null) { @@ -205,7 +205,7 @@ public function reset() */ class Psr18NetworkException extends \RuntimeException implements NetworkExceptionInterface { - private RequestInterface $request; + private $request; public function __construct(TransportExceptionInterface $e, RequestInterface $request) { @@ -224,7 +224,7 @@ public function getRequest(): RequestInterface */ class Psr18RequestException extends \InvalidArgumentException implements RequestExceptionInterface { - private RequestInterface $request; + private $request; public function __construct(TransportExceptionInterface $e, RequestInterface $request) { diff --git a/Response/AmpResponse.php b/Response/AmpResponse.php index c1cfeec..3c9b4bb 100644 --- a/Response/AmpResponse.php +++ b/Response/AmpResponse.php @@ -45,9 +45,9 @@ final class AmpResponse implements ResponseInterface, StreamableInterface private static string $nextId = 'a'; - private AmpClientState $multi; + private $multi; private ?array $options; - private CancellationTokenSource $canceller; + private $canceller; private \Closure $onProgress; private static ?string $delay = null; diff --git a/Response/AsyncContext.php b/Response/AsyncContext.php index a762d43..a029510 100644 --- a/Response/AsyncContext.php +++ b/Response/AsyncContext.php @@ -25,8 +25,8 @@ final class AsyncContext { private $passthru; - private HttpClientInterface $client; - private ResponseInterface $response; + private $client; + private $response; private array $info = []; private $content; private int $offset; diff --git a/Response/AsyncResponse.php b/Response/AsyncResponse.php index d269332..4bc76a8 100644 --- a/Response/AsyncResponse.php +++ b/Response/AsyncResponse.php @@ -34,8 +34,8 @@ final class AsyncResponse implements ResponseInterface, StreamableInterface private const FIRST_CHUNK_YIELDED = 1; private const LAST_CHUNK_YIELDED = 2; - private ?HttpClientInterface $client; - private ResponseInterface $response; + private $client; + private $response; private array $info = ['canceled' => false]; private $passthru; private $stream; diff --git a/Response/CurlResponse.php b/Response/CurlResponse.php index d064953..0876249 100644 --- a/Response/CurlResponse.php +++ b/Response/CurlResponse.php @@ -33,7 +33,7 @@ final class CurlResponse implements ResponseInterface, StreamableInterface use TransportResponseTrait; private static bool $performing = false; - private CurlClientState $multi; + private $multi; /** * @var resource diff --git a/Response/HttplugPromise.php b/Response/HttplugPromise.php index 1e80907..66e0d90 100644 --- a/Response/HttplugPromise.php +++ b/Response/HttplugPromise.php @@ -23,7 +23,7 @@ */ final class HttplugPromise implements HttplugPromiseInterface { - private GuzzlePromiseInterface $promise; + private $promise; public function __construct(GuzzlePromiseInterface $promise) { diff --git a/Response/NativeResponse.php b/Response/NativeResponse.php index f157ad1..1e9344f 100644 --- a/Response/NativeResponse.php +++ b/Response/NativeResponse.php @@ -43,7 +43,7 @@ final class NativeResponse implements ResponseInterface, StreamableInterface */ private $buffer; - private NativeClientState $multi; + private $multi; private float $pauseExpiry = 0.0; /** diff --git a/Response/StreamWrapper.php b/Response/StreamWrapper.php index 9879c78..03b07a2 100644 --- a/Response/StreamWrapper.php +++ b/Response/StreamWrapper.php @@ -25,9 +25,9 @@ class StreamWrapper /** @var resource|string|null */ public $context; - private HttpClientInterface|ResponseInterface $client; + private $client; - private ResponseInterface $response; + private $response; /** @var resource|null */ private $content; diff --git a/Response/TraceableResponse.php b/Response/TraceableResponse.php index 1549a61..f8a7cee 100644 --- a/Response/TraceableResponse.php +++ b/Response/TraceableResponse.php @@ -31,10 +31,10 @@ */ class TraceableResponse implements ResponseInterface, StreamableInterface { - private HttpClientInterface $client; - private ResponseInterface $response; + private $client; + private $response; private mixed $content; - private ?StopwatchEvent $event; + private $event; public function __construct(HttpClientInterface $client, ResponseInterface $response, &$content, StopwatchEvent $event = null) { diff --git a/Response/TransportResponseTrait.php b/Response/TransportResponseTrait.php index 3705161..33a74a4 100644 --- a/Response/TransportResponseTrait.php +++ b/Response/TransportResponseTrait.php @@ -11,13 +11,11 @@ namespace Symfony\Component\HttpClient\Response; -use Psr\Log\LoggerInterface; use Symfony\Component\HttpClient\Chunk\DataChunk; use Symfony\Component\HttpClient\Chunk\ErrorChunk; use Symfony\Component\HttpClient\Chunk\FirstChunk; use Symfony\Component\HttpClient\Chunk\LastChunk; use Symfony\Component\HttpClient\Exception\TransportException; -use Symfony\Component\HttpClient\Internal\Canary; use Symfony\Component\HttpClient\Internal\ClientState; /** @@ -41,10 +39,10 @@ trait TransportResponseTrait private $handle; private int|string $id; private ?float $timeout = 0; - private \InflateContext|bool|null $inflate = null; + private $inflate = null; private ?array $finalInfo = null; - private Canary $canary; - private ?LoggerInterface $logger = null; + private $canary; + private $logger = null; /** * {@inheritdoc} diff --git a/RetryableHttpClient.php b/RetryableHttpClient.php index a38791e..3c7c7aa 100644 --- a/RetryableHttpClient.php +++ b/RetryableHttpClient.php @@ -32,9 +32,9 @@ class RetryableHttpClient implements HttpClientInterface, ResetInterface { use AsyncDecoratorTrait; - private RetryStrategyInterface $strategy; + private $strategy; private int $maxRetries; - private LoggerInterface $logger; + private $logger; /** * @param int $maxRetries The maximum number of times to retry diff --git a/ScopingHttpClient.php b/ScopingHttpClient.php index ba51081..74bb820 100644 --- a/ScopingHttpClient.php +++ b/ScopingHttpClient.php @@ -28,7 +28,7 @@ class ScopingHttpClient implements HttpClientInterface, ResetInterface, LoggerAw { use HttpClientTrait; - private HttpClientInterface $client; + private $client; private array $defaultOptionsByRegexp; private ?string $defaultRegexp; diff --git a/TraceableHttpClient.php b/TraceableHttpClient.php index a1302b1..f584f61 100644 --- a/TraceableHttpClient.php +++ b/TraceableHttpClient.php @@ -26,9 +26,9 @@ */ final class TraceableHttpClient implements HttpClientInterface, ResetInterface, LoggerAwareInterface { - private HttpClientInterface $client; + private $client; private array $tracedRequests = []; - private ?Stopwatch $stopwatch; + private $stopwatch; public function __construct(HttpClientInterface $client, Stopwatch $stopwatch = null) {