From 3f4821c3021ac7e5a404edb5d371c3d2fdeb38b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 16 Feb 2017 16:01:02 +0100 Subject: [PATCH] Prepare v0.5.0 release --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ README.md | 39 +++++++++++++++++++++++++-------------- composer.json | 4 ++-- 3 files changed, 62 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 851b1d65..2c6a1735 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog +## 0.5.0 (2017-02-16) + +* Feature / BC break: Change `Request` methods to be in line with PSR-7 + (#117 by @clue) + * Rename `getQuery()` to `getQueryParams()` + * Rename `getHttpVersion()` to `getProtocolVersion()` + * Change `getHeaders()` to always return an array of string values + for each header + +* Feature / BC break: Update Socket component to v0.5 and + add secure HTTPS server support + (#90 and #119 by @clue) + + ```php + // old plaintext HTTP server + $socket = new React\Socket\Server($loop); + $socket->listen(8080, '127.0.0.1'); + $http = new React\Http\Server($socket); + + // new plaintext HTTP server + $socket = new React\Socket\Server('127.0.0.1:8080', $loop); + $http = new React\Http\Server($socket); + + // new secure HTTPS server + $socket = new React\Socket\Server('127.0.0.1:8080', $loop); + $socket = new React\Socket\SecureServer($socket, $loop, array( + 'local_cert' => __DIR__ . '/localhost.pem' + )); + $http = new React\Http\Server($socket); + ``` + +* BC break: Mark internal APIs as internal or private and + remove unneeded `ServerInterface` + (#118 by @clue, #95 by @legionth) + ## 0.4.4 (2017-02-13) * Feature: Add request header accessors (à la PSR-7) diff --git a/README.md b/README.md index 96d14f09..cffa7da5 100644 --- a/README.md +++ b/README.md @@ -2,19 +2,30 @@ [![Build Status](https://secure.travis-ci.org/reactphp/http.png?branch=master)](http://travis-ci.org/reactphp/http) [![Code Climate](https://codeclimate.com/github/reactphp/http/badges/gpa.svg)](https://codeclimate.com/github/reactphp/http) -Library for building an evented http server. - -This component builds on top of the `Socket` component to implement HTTP. Here -are the main concepts: - -* **Server**: Attaches itself to an instance of - `React\Socket\ServerInterface`, parses any incoming data as HTTP, emits a - `request` event for each request. -* **Request**: A `ReadableStream` which streams the request body and contains - meta data which was parsed from the request header. -* **Response** A `WritableStream` which streams the response body. You can set - the status code and response headers via the `writeHead()` method. - +Event-driven, streaming plaintext HTTP and secure HTTPS server for [ReactPHP](https://reactphp.org/) + +**Table of Contents** + +* [Quickstart example](#quickstart-example) +* [Usage](#usage) + * [Server](#server) + * [Request](#request) + * [getMethod()](#getmethod) + * [getQueryParams()](#getqueryparams] + * [getProtocolVersion()](#getprotocolversion) + * [getHeaders()](#getheaders) + * [getHeader()](#getheader) + * [getHeaderLine()](#getheaderline) + * [hasHeader()](#hasheader) + * [expectsContinue()](#expectscontinue) + * [Response](#response) + * [writeContinue()](#writecontinue) + * [writeHead()](#writehead) +* [Install](#install) +* [Tests](#tests) +* [License](#license) + +> Note: This project is in beta stage! Feel free to report any issues you encounter. ## Quickstart example @@ -255,7 +266,7 @@ The recommended way to install this library is [through Composer](http://getcomp This will install the latest supported version: ```bash -$ composer require react/http:^0.4.4 +$ composer require react/http:^0.5 ``` More details about version upgrades can be found in the [CHANGELOG](CHANGELOG.md). diff --git a/composer.json b/composer.json index 40c0582b..a7ca133b 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "react/http", - "description": "Library for building an evented http server.", - "keywords": ["http"], + "description": "Event-driven, streaming plaintext HTTP and secure HTTPS server for ReactPHP", + "keywords": ["event-driven", "streaming", "HTTP", "HTTPS", "server", "ReactPHP"], "license": "MIT", "require": { "php": ">=5.3.0",