Skip to content

Commit

Permalink
Added Thruster\HttpMessage instead Guzzle/Zend PSR-7 Implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurimas Niekis committed Feb 11, 2016
1 parent 0df69c4 commit 1038a41
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 280 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
],
"require": {
"php": ">=7.0",
"psr/http-message": "~1.0",
"guzzlehttp/psr7": "~1.2",
"thruster/http-message": "~1.0",
"thruster/event-emitter": "~1.0"
},
"require-dev": {
Expand Down
19 changes: 6 additions & 13 deletions src/RequestParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Thruster\Component\Http\Exception\RequestEntityTooLargeException;
use Thruster\Component\Http\Exception\RequestHTTPVersionNotSupported;
use Thruster\Component\Http\Exception\RequestURITooLongException;
use Thruster\Component\Stream\StreamInterface;
use Thruster\Component\HttpMessage\ServerRequest;

/**
* Class RequestParser
Expand All @@ -33,12 +33,12 @@ class RequestParser implements EventEmitterInterface
protected $receivedHead;

/**
* @var resource
* @var string
*/
protected $head;

/**
* @var string
* @var resource
*/
protected $body;

Expand Down Expand Up @@ -185,20 +185,13 @@ protected function buildRequest()
{
rewind($this->body);

$request = new ServerRequest(
[],
[],
$this->uri,
return new ServerRequest(
$this->httpMethod,
$this->body,
$this->uri,
$this->headers,
[],
[],
null,
$this->body,
$this->protocolVersion
);

return $request;
}

protected function isRequestFinished() : bool
Expand Down
232 changes: 0 additions & 232 deletions src/ServerRequest.php

This file was deleted.

33 changes: 0 additions & 33 deletions src/Tests/ServerRequestTest.php

This file was deleted.

0 comments on commit 1038a41

Please sign in to comment.