From 84798258c9bf609276fa57753b1d8de1b0e470d4 Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Sun, 25 May 2014 11:20:40 -0400 Subject: [PATCH] Updated files to act as a standalone component --- .gitignore | 2 ++ .travis.yml | 14 ++++++++++++++ README.md | 5 ++++- composer.json | 6 ++++-- Request.php => src/Request.php | 0 .../RequestHeaderParser.php | 0 Response.php => src/Response.php | 0 ResponseCodes.php => src/ResponseCodes.php | 0 Server.php => src/Server.php | 0 ServerInterface.php => src/ServerInterface.php | 0 10 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 .travis.yml rename Request.php => src/Request.php (100%) rename RequestHeaderParser.php => src/RequestHeaderParser.php (100%) rename Response.php => src/Response.php (100%) rename ResponseCodes.php => src/ResponseCodes.php (100%) rename Server.php => src/Server.php (100%) rename ServerInterface.php => src/ServerInterface.php (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..987e2a25 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +composer.lock +vendor diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..525cdc6a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: php + +php: + - 5.4 + - 5.5 + - 5.6 + - hhvm + +matrix: + allow_failures: + - php: hhvm + +before_script: + - composer install --dev --prefer-source diff --git a/README.md b/README.md index 098fc178..e1279b0e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Http Component +[![Build Status](https://secure.travis-ci.org/reactphp/http.png?branch=master)](http://travis-ci.org/reactphp/http) + Library for building an evented http server. This component builds on top of the `Socket` component to implement HTTP. Here @@ -16,7 +18,7 @@ are the main concepts: ## Usage This is an HTTP server which responds with `Hello World` to every request. - +```php $loop = React\EventLoop\Factory::create(); $socket = new React\Socket\Server($loop); @@ -28,3 +30,4 @@ This is an HTTP server which responds with `Hello World` to every request. $socket->listen(1337); $loop->run(); +``` diff --git a/composer.json b/composer.json index 8a74d13c..670e9d62 100644 --- a/composer.json +++ b/composer.json @@ -9,11 +9,13 @@ "react/socket": "0.4.*" }, "autoload": { - "psr-4": { "React\\Http\\": "" } + "psr-4": { + "React\\Http\\": "src" + } }, "extra": { "branch-alias": { - "dev-master": "0.4-dev" + "dev-master": "0.5-dev" } } } diff --git a/Request.php b/src/Request.php similarity index 100% rename from Request.php rename to src/Request.php diff --git a/RequestHeaderParser.php b/src/RequestHeaderParser.php similarity index 100% rename from RequestHeaderParser.php rename to src/RequestHeaderParser.php diff --git a/Response.php b/src/Response.php similarity index 100% rename from Response.php rename to src/Response.php diff --git a/ResponseCodes.php b/src/ResponseCodes.php similarity index 100% rename from ResponseCodes.php rename to src/ResponseCodes.php diff --git a/Server.php b/src/Server.php similarity index 100% rename from Server.php rename to src/Server.php diff --git a/ServerInterface.php b/src/ServerInterface.php similarity index 100% rename from ServerInterface.php rename to src/ServerInterface.php