Skip to content

Commit b791719

Browse files
authored
Re-define middleware factory & fix requests (#128)
1 parent a6cb0a3 commit b791719

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Yiisoft\Middleware\Dispatcher\MiddlewareFactoryInterface;
6+
use Yiisoft\RequestModel\MiddlewareFactory;
7+
8+
/**
9+
* @var array $params
10+
*/
11+
12+
return [
13+
MiddlewareFactoryInterface::class => MiddlewareFactory::class,
14+
];

src/Auth/AuthRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
namespace App\Auth;
66

77
use Yiisoft\RequestModel\RequestModel;
8-
use Yiisoft\RequestModel\ValidatableModelInterface;
98
use Yiisoft\Validator\Rule\Required;
109
use OpenApi\Annotations as OA;
10+
use Yiisoft\Validator\RulesProviderInterface;
1111

1212
/**
1313
* @OA\Schema(
@@ -16,7 +16,7 @@
1616
* @OA\Property(example="Opal1144", property="password", format="string"),
1717
* )
1818
*/
19-
final class AuthRequest extends RequestModel implements ValidatableModelInterface
19+
final class AuthRequest extends RequestModel implements RulesProviderInterface
2020
{
2121
public function getLogin(): string
2222
{

0 commit comments

Comments
 (0)