Skip to content

Commit 8fe665e

Browse files
committed
chore: remove validators
1 parent 0b44ab2 commit 8fe665e

Some content is hidden

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

52 files changed

+74
-3142
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ $user
4242
->setCallback(fn (Request $request) => $request->getHeader('x-user-id', 'John Doe'));
4343

4444
$container->set($user);
45-
46-
// Defining Route
47-
Http::get('/hello-world')
45+
46+
// Defining Route
47+
Http::get('/hello-world')
4848
->inject('request') // Auto-injected each request
4949
->inject('response') // Auto-injected each request
5050
->inject('user')
@@ -67,7 +67,7 @@ $http->start();
6767
Run HTTP server:
6868

6969
```bash
70-
php -S localhost:8000 src/server.php
70+
php -S localhost:8000 src/server.php
7171
```
7272

7373
Send HTTP request:
@@ -130,7 +130,7 @@ $http->start();
130130

131131
Parameters are used to receive input into endpoint action from the HTTP request. Parameters could be defined as URL parameters or in a body with a structure such as JSON.
132132

133-
Every parameter must have a validator defined. Validators are simple classes that verify the input and ensure the security of inputs. You can define your own validators or use some of [built-in validators](/src/Http/Validator).
133+
Every parameter must have a validator defined. Validators are simple classes that verify the input and ensure the security of inputs. You can define your own validators or use some of [built-in validators](https://github.com/utopia-php/validators).
134134

135135
Define an endpoint with params:
136136

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"require": {
3131
"php": ">=8.1",
3232
"ext-swoole": "*",
33-
"utopia-php/servers": "0.1.*",
33+
"utopia-php/servers": "0.2.*",
3434
"utopia-php/compression": "0.1.*",
3535
"utopia-php/telemetry": "0.1.*"
3636
},

composer.lock

Lines changed: 61 additions & 14 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 & 2 deletions
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

@@ -284,4 +284,3 @@ If you have PHP and Composer installed on your device, you can run Utopia apps l
284284
> Utopia HTTP requires PHP 8.1 or later. We recommend using the latest PHP version whenever possible.
285285
286286
Wonderful! 😄 You’re all set to create a basic demo app using the Utopia HTTP. If you have any issues or questions feel free to reach out to us on our [Discord Server](https://appwrite.io/discord).
287-

example/src/server.php

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

1212
class User
1313
{

phpunit.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<file>./tests/RouterTest.php</file>
2121
<file>./tests/RouteTest.php</file>
2222
<file>./tests/UtopiaFPMRequestTest.php</file>
23-
<directory>./tests/Validator/</directory>
2423
</testsuite>
2524
<testsuite name="e2e">
2625
<file>./tests/e2e/Client.php</file>

src/Http/Validator.php

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

src/Http/Validator/AllOf.php

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

0 commit comments

Comments
 (0)