Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
Fix readme & update yiisoft/router version to ^3.0 (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
rustamwin committed Feb 19, 2023
1 parent 425000d commit 12ddcb1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions README.md
Expand Up @@ -71,16 +71,10 @@ final class AuthRequest extends RequestModel implements RulesProviderInterface
}
```

Middleware:
Route:

```php
Route::post('/test')
->middleware(
fn(\Yiisoft\Middleware\Dispatcher\MiddlewareFactory $factory) => $factory->create(
SimpleController::class,
'action'
)
)
->action([SimpleController::class, 'action'])
->name('site/test')
```
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -27,7 +27,7 @@
"yiisoft/arrays": "^2.0|^3.0",
"yiisoft/injector": "^1.0",
"yiisoft/middleware-dispatcher": "^5.0",
"yiisoft/router": "^1.2|^2.0",
"yiisoft/router": "^3.0",
"yiisoft/validator": "dev-master"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion tests/RequestModelFactoryTest.php
Expand Up @@ -62,7 +62,7 @@ public function testCorrectlyIfNotFoundRequestModel(): void
public function testValidationInvalidRequestModel(): void
{
$this->expectException(RequestValidationException::class);
$this->expectDeprecationMessage('Request model validation error');
$this->expectExceptionMessage('Request model validation error');

$factory = $this->createRequestModelFactory($this->createContainer());
$params = (new ReflectionFunction(fn (SimpleValidationRequestModel $requestModel) => ''))->getParameters();
Expand Down

0 comments on commit 12ddcb1

Please sign in to comment.