Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat. HTTP Framework V2 #376

Merged
merged 52 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bf740e2
fix validator namespaces
lohanidamodar Jul 18, 2023
3bf21fd
Switch v2 branch
Meldiron Oct 4, 2023
ffa1b71
Merge branch 'main' into feat-framework-v2
Meldiron Oct 5, 2023
1d4ab3d
Fix lockfile after merge
Meldiron Oct 5, 2023
41134cc
Make authorization per-instance
Meldiron Oct 19, 2023
a8bec8b
Fix incorrect Auth instance in tests
Meldiron Oct 19, 2023
fefad52
Fix tests
Meldiron Oct 19, 2023
c14be0f
PR review changes
Meldiron Jan 3, 2024
00c1553
Refactor auth message and action
Meldiron Jan 3, 2024
c2f3585
Fix test
Meldiron Jan 3, 2024
dd4331d
Merge pull request #375 from utopia-php/feat-authorization-v2-result
Meldiron Jan 3, 2024
59588d6
Make auth validator follow adapter
Meldiron Jan 24, 2024
e79ddd1
Upgrade dependencies
Meldiron Jan 24, 2024
8ce9213
Merge remote-tracking branch 'origin/main' into feat-framework-v2
Meldiron Jan 24, 2024
f55b13d
Fix tests
Meldiron Jan 24, 2024
26704cb
PR review changes
Meldiron Jan 25, 2024
95b4d71
Merge remote-tracking branch 'origin/feat-framework-v2' into feat-aut…
Meldiron Jan 25, 2024
efd5d1e
Update lockfile
Meldiron Jan 25, 2024
f0dc793
CI/CD fixes
Meldiron Jan 25, 2024
597a9ab
Fix all tests 🎉
Meldiron Jan 25, 2024
6f8b4a7
Remove validation exception
Meldiron Jan 25, 2024
b64caf4
Merge pull request #343 from utopia-php/feat-authorization-v2
abnegate Jan 25, 2024
fa6afda
Merge remote-tracking branch 'origin/main' into feat-framework-v2
Meldiron Feb 22, 2024
6dd6562
Post-merge fixes
Meldiron Feb 22, 2024
3465bc5
Add method for coroutine-style to wipe previous transformations state
Meldiron Feb 27, 2024
79fd579
Improve clear transformation
Meldiron Feb 27, 2024
c4727ee
Merge remote-tracking branch 'origin/main' into feat-framework-v2
Meldiron Mar 7, 2024
73fb443
Resolve framework V2 issues
Meldiron Mar 7, 2024
bdd9140
Add new method
Meldiron Mar 7, 2024
b0010c4
composer.lock
fogelito Apr 17, 2024
b3f7843
Merge branch 'main' of github.com:utopia-php/database into feat-frame…
fogelito Apr 17, 2024
0645d85
composer.lock
fogelito Apr 17, 2024
a0bd330
Merge branch 'main' of github.com:utopia-php/database into feat-frame…
fogelito Apr 18, 2024
6b8264a
updateRelationship
fogelito Apr 18, 2024
0d7b914
Remove Proxy files
fogelito Apr 19, 2024
2ed8b6b
Merge branch 'main' of github.com:utopia-php/database into feat-frame…
fogelito May 9, 2024
04abd91
pull main
fogelito May 9, 2024
f53d63b
lint
fogelito May 9, 2024
e29e62b
Merge branch 'refs/heads/main' into feat-framework-v2
byawitz Jun 6, 2024
5b0d6ba
chore: Updating composer.lock
byawitz Jun 6, 2024
0b45a0d
Merge branch 'refs/heads/main' into feat-framework-v2
byawitz Jul 19, 2024
964bfa2
chore: merge
byawitz Jul 19, 2024
ab01fa3
chore: codeql
byawitz Jul 19, 2024
9ddf91a
tests: Adjusting to new authorization
byawitz Jul 19, 2024
36720e8
chore: versions upgrade
byawitz Aug 9, 2024
a170c08
Merge branch 'main' into feat-framework-v2
byawitz Sep 4, 2024
a25e63e
chore: merge
byawitz Sep 4, 2024
8dfdf8d
chore: format
byawitz Sep 4, 2024
bfd1168
chore: Updating composer.lock
byawitz Sep 4, 2024
d70eb76
chore: format
byawitz Sep 4, 2024
e2bf86a
chore: Updating composer.lock
byawitz Sep 5, 2024
bb2a687
chore: updating packages
byawitz Sep 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/tasks/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Utopia\Database\Database;
use Utopia\Database\Adapter\Mongo;
use Utopia\Database\Adapter\MariaDB;
use Utopia\Validator\Text;
use Utopia\Http\Validator\Text;

/**
* @Example
Expand Down
4 changes: 2 additions & 2 deletions bin/tasks/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
use Utopia\Database\Document;
use Utopia\Database\Adapter\Mongo;
use Utopia\Database\Adapter\MariaDB;
use Utopia\Validator\Numeric;
use Utopia\Validator\Text;
use Utopia\Http\Validator\Numeric;
use Utopia\Http\Validator\Text;

/**
* @Example
Expand Down
4 changes: 2 additions & 2 deletions bin/tasks/query.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
use Utopia\Database\Adapter\Mongo;
use Utopia\Database\Adapter\MariaDB;
use Utopia\Database\Validator\Authorization;
use Utopia\Validator\Numeric;
use Utopia\Validator\Text;
use Utopia\Http\Validator\Numeric;
use Utopia\Http\Validator\Text;

/**
* @Example
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ext-pdo": "*",
"ext-mbstring": "*",
"php": ">=8.0",
"utopia-php/framework": "0.*.*",
"utopia-php/framework": "dev-fix-v2-swoole-coroutines as 0.31.0",
Meldiron marked this conversation as resolved.
Show resolved Hide resolved
"utopia-php/cache": "0.8.*",
"utopia-php/mongo": "0.3.*"
},
Expand Down
45 changes: 28 additions & 17 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Database/Validator/Authorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Utopia\Database\Validator;

use Utopia\Validator;
use Utopia\Http\Validator;

class Authorization extends Validator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Validator/Datetime.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Utopia\Database\Validator;

use Utopia\Validator;
use Utopia\Http\Validator;

class Datetime extends Validator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Validator/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Utopia\Database\Database;
use Utopia\Database\Exception as DatabaseException;
use Utopia\Validator;
use Utopia\Http\Validator;
use Utopia\Database\Document;

class Index extends Validator
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Validator/Key.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Utopia\Database\Validator;

use Utopia\Validator;
use Utopia\Http\Validator;

class Key extends Validator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Validator/Queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Utopia\Database\Validator;

use Utopia\Database\Validator\Query\Base;
use Utopia\Validator;
use Utopia\Http\Validator;
use Utopia\Database\Query;

class Queries extends Validator
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Validator/Query/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Utopia\Database\Validator\Query;

use Utopia\Validator;
use Utopia\Http\Validator;

abstract class Base extends Validator
{
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Validator/Query/Limit.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Utopia\Database\Validator\Query;

use Utopia\Database\Query;
use Utopia\Validator\Numeric;
use Utopia\Validator\Range;
use Utopia\Http\Validator\Numeric;
use Utopia\Http\Validator\Range;

class Limit extends Base
{
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Validator/Query/Offset.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Utopia\Database\Validator\Query;

use Utopia\Database\Query;
use Utopia\Validator\Numeric;
use Utopia\Validator\Range;
use Utopia\Http\Validator\Numeric;
use Utopia\Http\Validator\Range;

class Offset extends Base
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Validator/Roles.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Utopia\Database\Validator;

use Utopia\Database\Helpers\Role;
use Utopia\Validator;
use Utopia\Http\Validator;

class Roles extends Validator
{
Expand Down
12 changes: 6 additions & 6 deletions src/Database/Validator/Structure.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
use Utopia\Database\Document;
use Utopia\Database\Exception as DatabaseException;
use Utopia\Database\Validator\Datetime as DatetimeValidator;
use Utopia\Validator;
use Utopia\Validator\Boolean;
use Utopia\Validator\FloatValidator;
use Utopia\Validator\Integer;
use Utopia\Validator\Text;
use Utopia\Http\Validator;
use Utopia\Http\Validator\Boolean;
use Utopia\Http\Validator\FloatValidator;
use Utopia\Http\Validator\Integer;
use Utopia\Http\Validator\Text;

class Structure extends Validator
{
Expand Down Expand Up @@ -115,7 +115,7 @@ public static function getFormats(): array
* Stores a callback and required params to create Validator
*
* @param string $name
* @param Closure $callback Callback that accepts $params in order and returns \Utopia\Validator
* @param Closure $callback Callback that accepts $params in order and returns \Utopia\Http\Validator
* @param string $type Primitive data type for validation
*/
public static function addFormat(string $name, Closure $callback, string $type): void
Expand Down
2 changes: 1 addition & 1 deletion tests/Database/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
use Utopia\Database\Validator\Datetime as DatetimeValidator;
use Utopia\Database\Validator\Index;
use Utopia\Database\Validator\Structure;
use Utopia\Validator\Range;
use Utopia\Http\Validator\Range;
use Utopia\Database\Exception\Structure as StructureException;

abstract class Base extends TestCase
Expand Down
6 changes: 3 additions & 3 deletions tests/Database/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

namespace Utopia\Tests;

use Utopia\Validator;
use Utopia\Validator\Text;
use Utopia\Http\Validator;
use Utopia\Http\Validator\Text;

/**
* Format Test for Email
*
* Validate that an variable is a valid email address
*
* @package Utopia\Validator
* @package Utopia\Http\Validator
*/
class Format extends Text
{
Expand Down