Skip to content

Commit 926be46

Browse files
committed
v3
1 parent 3fe46b0 commit 926be46

File tree

6 files changed

+30
-22
lines changed

6 files changed

+30
-22
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
# Very soon...
1+
## HTTP Router
2+
3+
### A flexible HTTP router for PHP 8.1+ based on PSR-7 and PSR-15 with built-in Swagger support.
4+
5+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/sunrise-php/http-router/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/sunrise-php/http-router/?branch=master)
6+
[![Code Coverage](https://scrutinizer-ci.com/g/sunrise-php/http-router/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/sunrise-php/http-router/?branch=master)
7+
[![Total Downloads](https://poser.pugx.org/sunrise/http-router/downloads?format=flat)](https://packagist.org/packages/sunrise/http-router)
8+
9+
## Installation
10+
11+
```bash
12+
composer require sunrise/http-router
13+
```

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sunrise/http-router",
33
"homepage": "https://github.com/sunrise-php/http-router",
4-
"description": "HTTP Router for PHP 8.1+ based on PSR-7 and PSR-15 with built-in Swagger support.",
4+
"description": "A flexible HTTP router for PHP 8.1+ based on PSR-7 and PSR-15 with built-in Swagger support.",
55
"license": "MIT",
66
"keywords": [
77
"fenric",
@@ -31,7 +31,8 @@
3131
"psr/http-server-middleware": "^1.0",
3232
"psr/log": "^1.0 || ^2.0 || ^3.0",
3333
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0",
34-
"sunrise/coder": "^1.0@RC"
34+
"sunrise/coder": "^1.0@RC",
35+
"sunrise/hydrator": "^3.15"
3536
},
3637
"require-dev": {
3738
"php-di/php-di": "^7.0",
@@ -40,7 +41,6 @@
4041
"ramsey/uuid": "^4.7",
4142
"squizlabs/php_codesniffer": "^3.11",
4243
"sunrise/http-message": "^3.4",
43-
"sunrise/hydrator": "^3.15",
4444
"symfony/console": "^6.4",
4545
"symfony/uid": "^6.4",
4646
"symfony/validator": "^6.4",
File renamed without changes.

phpstan.neon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
$config = [
66
'includes' => [
7-
__DIR__ . '/phpstan.neon.dist',
7+
__DIR__ . '/phpstan.neon',
88
],
99
'parameters' => [
1010
'phpVersion' => PHP_VERSION_ID,

resources/definitions/controllers/openapi_controller.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@
1313
use function DI\get;
1414

1515
return [
16-
OpenApiController::class => create()
17-
->constructor(
18-
openApiConfiguration: get(OpenApiConfiguration::class),
19-
openApiDocumentManager: get(OpenApiDocumentManagerInterface::class),
20-
responseFactory: get(ResponseFactoryInterface::class),
21-
streamFactory: get(StreamFactoryInterface::class),
22-
),
23-
2416
'router.descriptor_loader.resources' => add([
25-
OpenApiController::class,
17+
create(OpenApiController::class)
18+
->constructor(
19+
openApiConfiguration: get(OpenApiConfiguration::class),
20+
openApiDocumentManager: get(OpenApiDocumentManagerInterface::class),
21+
responseFactory: get(ResponseFactoryInterface::class),
22+
streamFactory: get(StreamFactoryInterface::class),
23+
),
2624
]),
2725
];

resources/definitions/controllers/swagger_controller.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@
1212
use function DI\get;
1313

1414
return [
15-
SwaggerController::class => create()
16-
->constructor(
17-
swaggerConfiguration: get(SwaggerConfiguration::class),
18-
responseFactory: get(ResponseFactoryInterface::class),
19-
streamFactory: get(StreamFactoryInterface::class),
20-
),
21-
2215
'router.descriptor_loader.resources' => add([
23-
SwaggerController::class,
16+
create(SwaggerController::class)
17+
->constructor(
18+
swaggerConfiguration: get(SwaggerConfiguration::class),
19+
responseFactory: get(ResponseFactoryInterface::class),
20+
streamFactory: get(StreamFactoryInterface::class),
21+
),
2422
]),
2523
];

0 commit comments

Comments
 (0)