Skip to content

Commit

Permalink
Merge pull request #21 from bearsunday/psr7-lib
Browse files Browse the repository at this point in the history
Replace laminas-diactoros with nyholm/psr7
  • Loading branch information
koriym committed Nov 24, 2020
2 parents 3944508 + eef54dc commit 30044b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
"require": {
"php": ">=7.2",
"aura/router": "^3.1",
"laminas/laminas-diactoros": "^1.7",
"doctrine/annotations": "^1.7",
"laminas/laminas-dependency-plugin": "^1.0"
"nyholm/psr7": "^1.3"
},
"require-dev": {
"bear/package": "1.x-dev",
Expand Down
12 changes: 4 additions & 8 deletions src/Provide/Router/AuraRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
use BEAR\Sunday\Extension\Router\NullMatch;
use BEAR\Sunday\Extension\Router\RouterInterface;
use BEAR\Sunday\Extension\Router\RouterMatch;
use Laminas\Diactoros\ServerRequest;
use function file_get_contents;
use Nyholm\Psr7\ServerRequest;
use Ray\Di\Di\Inject;

/**
Expand Down Expand Up @@ -74,15 +75,10 @@ public function setSchemaHost(string $schemeHost) : void
public function match(array $globals, array $server) : RouterMatch
{
$psr15request = new ServerRequest(
$server,
[],
$server['REQUEST_URI'],
$server['REQUEST_METHOD'],
'php://input',
[],
$server['REQUEST_URI'],
[],
$globals['_GET'],
$globals['_POST']
(string) file_get_contents('php://input')
);
$route = $this->matcher->match($psr15request);
if ($route === false) {
Expand Down

0 comments on commit 30044b1

Please sign in to comment.