minor #32928 [HttpClient] use "idle" instead of "inactivity" when telling 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
-------

d2c4bf0da8 [HttpClient] use "idle" instead of "inactivity" when telling about the timeout option
This commit is contained in:
Fabien Potencier 2019-08-05 07:44:07 +02:00
commit 02c1decd3c
4 changed files with 8 additions and 8 deletions

View File

@ -1348,7 +1348,7 @@ class Configuration implements ConfigurationInterface
->info('A comma separated list of hosts that do not require a proxy to be reached.') ->info('A comma separated list of hosts that do not require a proxy to be reached.')
->end() ->end()
->floatNode('timeout') ->floatNode('timeout')
->info('Defaults to "default_socket_timeout" ini parameter.') ->info('The idle timeout, defaults to the "default_socket_timeout" ini parameter.')
->end() ->end()
->scalarNode('bindto') ->scalarNode('bindto')
->info('A network interface name, IP address, a host name or a UNIX socket to bind to.') ->info('A network interface name, IP address, a host name or a UNIX socket to bind to.')

View File

@ -30,7 +30,7 @@ class ErrorChunk implements ChunkInterface
{ {
$this->offset = $offset; $this->offset = $offset;
$this->error = $error; $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.';
} }
/** /**

View File

@ -27,7 +27,7 @@ use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
interface ChunkInterface interface ChunkInterface
{ {
/** /**
* Tells when the inactivity timeout has been reached. * Tells when the idle timeout has been reached.
* *
* @throws TransportExceptionInterface on a network error * @throws TransportExceptionInterface on a network error
*/ */
@ -36,21 +36,21 @@ interface ChunkInterface
/** /**
* Tells when headers just arrived. * 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; public function isFirst(): bool;
/** /**
* Tells when the body just completed. * 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; public function isLast(): bool;
/** /**
* Returns the content of the response chunk. * 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; public function getContent(): string;

View File

@ -52,7 +52,7 @@ interface HttpClientInterface
'resolve' => [], // string[] - a map of host to IP address that SHOULD replace DNS resolution '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 '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 '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 '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_peer' => true, // see https://php.net/context.ssl for the following options
'verify_host' => true, 'verify_host' => true,
@ -85,7 +85,7 @@ interface HttpClientInterface
* Yields responses chunk by chunk as they complete. * Yields responses chunk by chunk as they complete.
* *
* @param ResponseInterface|ResponseInterface[]|iterable $responses One or more responses created by the current HTTP client * @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; public function stream($responses, float $timeout = null): ResponseStreamInterface;
} }