Skip to content

Commit 3571c49

Browse files
authored
Merge pull request #199 from utopia-php/feat-remove-validator
feat: remove validators and use utopia validators lib
2 parents 2c652b6 + b73e9e8 commit 3571c49

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+219
-3034
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
},
3131
"require": {
3232
"php": ">=8.0",
33-
"ext-swoole": "*"
33+
"ext-swoole": "*",
34+
"utopia-php/validators": "0.1.*"
3435
},
3536
"require-dev": {
3637
"phpunit/phpunit": "^9.5.25",

composer.lock

Lines changed: 206 additions & 155 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/Getting-Starting-Guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ use Utopia\Http\Swoole\Response;
144144
use Swoole\Http\Server;
145145
use Swoole\Http\Request as SwooleRequest;
146146
use Swoole\Http\Response as SwooleResponse;
147-
use Utopia\Http\Validator\Wildcard;
147+
use Utopia\Validator\Wildcard;
148148

149149
$http = new Server("0.0.0.0", 8080);
150150

example/src/server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Utopia\Http\Http;
66
use Utopia\Http\Response;
77
use Utopia\Http\Adapter\Swoole\Server;
8-
use Utopia\Http\Validator\Text;
8+
use Utopia\Validator\Text;
99

1010
Http::get('/')
1111
->param('name', 'World', new Text(256), 'Name to greet. Optional, max length 256.', true)

src/Http/Hook.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Utopia\Http;
44

5+
use Utopia\Validator;
6+
57
class Hook
68
{
79
/**

src/Http/Http.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Utopia\Http;
44

5+
use Utopia\Validator;
6+
57
class Http
68
{
79
/**

src/Http/Validator.php

Lines changed: 0 additions & 57 deletions
This file was deleted.

src/Http/Validator/AllOf.php

Lines changed: 0 additions & 86 deletions
This file was deleted.

src/Http/Validator/AnyOf.php

Lines changed: 0 additions & 87 deletions
This file was deleted.

src/Http/Validator/ArrayList.php

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)