Skip to content

2.0.0 RC3

Pre-release
Pre-release
Compare
Choose a tag to compare
@trowski trowski released this 05 Nov 23:03
5a4baa7
  • Updated to league/uri@^6. Consequentially, PHP 7.2+ is now required.
  • Renamed Server to HttpServer. An alias of Server to HttpServer was kept for backward compatibility with v1.x, but may be removed in a future version.
  • Added Push object for pushed resources. Response::getPush() now returns an array of Push objects.
  • Restored Client::isUnix() method.
  • Added ClientException::getClient() that returns the Client that caused the error.
  • Renamed Trailers::awaitMessage() to await().
  • Added Request::removeAttribute().
  • Back-pressure from consumption of request bodies is now used to control window sizes in HTTP/2. Window sizes are only increased in small increments instead of the entire allowable body size. This will improve memory consumption when handling large request bodies.
  • Refactored HTTP/2 flood prevention to be based on a ratio between payload and non-payload bytes received, inspired by NGINX's flood prevention. Some options were removed:
    • Removed Options::getMinimumAverageFrameSize() and withMinimumAverageFrameSize().
    • Removed Options::getFramesPerSecondLimit() and withFramesPerSecondLimit().
  • Removed Options::getConnectionTimeout() and withConnectionTimeout(). HTTP/1.x and HTTP/2 connection timeouts are now separate and can be set using the http1Timeout (default 15 seconds) and http2Timeout (default 60 seconds) options.
  • Added tlsSetupTimeout option. Default is 5 seconds.
  • Removed TimeReference and SystemTimeReference. Use Amp\Http\formatDateHeader() in the amphp/[email protected] package to generate the value for an HTTP header value containing a date.
  • Refactored TimeoutCache and renamed some methods. Client timeouts are no longer updated within Client, rather HttpDriver implementations must update the client timeout. Users should be unaffected by this change unless they implemented their own Client or HttpDriver.
  • HttpDriverFactory::selectDriver() now requires instances of ErrorHandler, Psr\Log\LoggerInterface, and Options in addition to the Client instance.