Skip to content

Commit

Permalink
minor #32928 [HttpClient] use "idle" instead of "inactivity" when tel…
Browse files Browse the repository at this point in the history
…ling about the timeout option (nicolas-grekas)

This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] use "idle" instead of "inactivity" when telling about the timeout option

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

I feel like this might be easier to understand.
This is also the word I used in the doc.

Commits
-------

d2c4bf0 [HttpClient] use "idle" instead of "inactivity" when telling about the timeout option
  • Loading branch information
fabpot committed Aug 5, 2019
2 parents b13e6af + d2c4bf0 commit 02c1dec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Expand Up @@ -1348,7 +1348,7 @@ private function addHttpClientSection(ArrayNodeDefinition $rootNode)
->info('A comma separated list of hosts that do not require a proxy to be reached.')
->end()
->floatNode('timeout')
->info('Defaults to "default_socket_timeout" ini parameter.')
->info('The idle timeout, defaults to the "default_socket_timeout" ini parameter.')
->end()
->scalarNode('bindto')
->info('A network interface name, IP address, a host name or a UNIX socket to bind to.')
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/HttpClient/Chunk/ErrorChunk.php
Expand Up @@ -30,7 +30,7 @@ public function __construct(int $offset, \Throwable $error = null)
{
$this->offset = $offset;
$this->error = $error;
$this->errorMessage = null !== $error ? $error->getMessage() : 'Reading from the response stream reached the inactivity timeout.';
$this->errorMessage = null !== $error ? $error->getMessage() : 'Reading from the response stream reached the idle timeout.';
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Contracts/HttpClient/ChunkInterface.php
Expand Up @@ -27,7 +27,7 @@
interface ChunkInterface
{
/**
* Tells when the inactivity timeout has been reached.
* Tells when the idle timeout has been reached.
*
* @throws TransportExceptionInterface on a network error
*/
Expand All @@ -36,21 +36,21 @@ public function isTimeout(): bool;
/**
* Tells when headers just arrived.
*
* @throws TransportExceptionInterface on a network error or when the inactivity timeout is reached
* @throws TransportExceptionInterface on a network error or when the idle timeout is reached
*/
public function isFirst(): bool;

/**
* Tells when the body just completed.
*
* @throws TransportExceptionInterface on a network error or when the inactivity timeout is reached
* @throws TransportExceptionInterface on a network error or when the idle timeout is reached
*/
public function isLast(): bool;

/**
* Returns the content of the response chunk.
*
* @throws TransportExceptionInterface on a network error or when the inactivity timeout is reached
* @throws TransportExceptionInterface on a network error or when the idle timeout is reached
*/
public function getContent(): string;

Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Contracts/HttpClient/HttpClientInterface.php
Expand Up @@ -52,7 +52,7 @@ interface HttpClientInterface
'resolve' => [], // string[] - a map of host to IP address that SHOULD replace DNS resolution
'proxy' => null, // string - by default, the proxy-related env vars handled by curl SHOULD be honored
'no_proxy' => null, // string - a comma separated list of hosts that do not require a proxy to be reached
'timeout' => null, // float - the inactivity timeout - defaults to ini_get('default_socket_timeout')
'timeout' => null, // float - the idle timeout - defaults to ini_get('default_socket_timeout')
'bindto' => '0', // string - the interface or the local socket to bind to
'verify_peer' => true, // see https://php.net/context.ssl for the following options
'verify_host' => true,
Expand Down Expand Up @@ -85,7 +85,7 @@ public function request(string $method, string $url, array $options = []): Respo
* Yields responses chunk by chunk as they complete.
*
* @param ResponseInterface|ResponseInterface[]|iterable $responses One or more responses created by the current HTTP client
* @param float|null $timeout The inactivity timeout before exiting the iterator
* @param float|null $timeout The idle timeout before yielding timeout chunks
*/
public function stream($responses, float $timeout = null): ResponseStreamInterface;
}

0 comments on commit 02c1dec

Please sign in to comment.