Skip to content

Commit 69d1afa

Browse files
committed
chore: extract validators
1 parent 0b44ab2 commit 69d1afa

File tree

110 files changed

+1277
-12498
lines changed

Some content is hidden

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

110 files changed

+1277
-12498
lines changed

β€Ž.github/workflows/bench.ymlβ€Ž

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
name: "CodeQL"
22

33
on: [pull_request]
4+
45
jobs:
5-
lint:
6+
codeql:
67
name: CodeQL
78
runs-on: ubuntu-latest
89

910
steps:
10-
- name: Checkout repository
11-
uses: actions/checkout@v3
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Setup PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: '8.1'
18+
coverage: none
19+
20+
- name: Install dependencies
21+
run: composer install --no-progress --prefer-dist
1222

13-
- name: Run CodeQL
14-
run: |
15-
docker run --rm -v $PWD:/app composer:2.8 sh -c \
16-
"composer install --profile --ignore-platform-reqs && composer check"
17-
23+
- name: Run Static Analysis
24+
run: composer check
25+

β€Ž.github/workflows/lint.ymlβ€Ž

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
name: "Linter"
22

33
on: [pull_request]
4+
45
jobs:
56
lint:
67
name: Linter
78
runs-on: ubuntu-latest
89

910
steps:
10-
- name: Checkout repository
11-
uses: actions/checkout@v3
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Setup PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: '8.1'
18+
coverage: none
19+
20+
- name: Install dependencies
21+
run: composer install --no-progress --prefer-dist
1222

13-
- name: Run Linter
14-
run: |
15-
docker run --rm -v $PWD:/app composer sh -c \
16-
"composer install --profile --ignore-platform-reqs && composer lint"
23+
- name: Run Linter
24+
run: composer lint

β€Ž.github/workflows/test.ymlβ€Ž

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,27 @@
11
name: "Tests"
22

33
on: [pull_request]
4+
45
jobs:
5-
lint:
6+
test:
67
name: Tests
78
runs-on: ubuntu-latest
89

910
steps:
10-
- name: Checkout repository
11-
uses: actions/checkout@v3
12-
13-
- name: Setup PHP
14-
uses: shivammathur/setup-php@v2
15-
with:
16-
php-version: '8.1'
17-
18-
- name: Validate composer.json and composer.lock
19-
run: composer validate --strict
20-
21-
- name: Setup Docker
22-
run: docker compose up -d --build
23-
24-
- name: Wait for Server to be ready
25-
run: sleep 10
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
2613

27-
- name: Run unit Tests
28-
run: docker compose exec swoole vendor/bin/phpunit --configuration phpunit.xml --testsuite=unit
14+
- name: Setup PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: '8.1'
18+
coverage: none
2919

30-
- name: Run FPM Tests
31-
run: docker compose exec fpm vendor/bin/phpunit --configuration phpunit.xml --group=fpm
20+
- name: Validate composer.json and composer.lock
21+
run: composer validate --strict
3222

33-
- name: Run Swoole Tests
34-
run: docker compose exec swoole vendor/bin/phpunit --configuration phpunit.xml --group=swoole
23+
- name: Install dependencies
24+
run: composer install --no-progress --prefer-dist
3525

36-
- name: Run Swoole Corotuine Tests
37-
run: docker compose exec swoole-coroutine vendor/bin/phpunit --configuration phpunit.xml --group=swoole-coroutine
26+
- name: Run PHPUnit
27+
run: composer test

β€Ž.vscode/launch.jsonβ€Ž

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

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
# Contributing
22

3-
We would ❀️ for you to contribute to Utopia HTTP and help make it better! We want contributing to this library to be fun, enjoyable, and educational for anyone and everyone. All contributions are welcome, including issues, new docs as well as updates and tweaks, blog posts, workshops, and more.
3+
We would ❀️ for you to contribute to Utopia Validators and help make it better! We want contributing to this library to be fun, enjoyable, and educational for anyone and everyone. All contributions are welcome, including issues, new docs as well as updates and tweaks, blog posts, workshops, and more.
44

55
## How to Start?
66

77
If you are worried or don’t know where to start, check out our next section explaining what kind of help we could use and where can you get involved. You can reach out with questions to [Eldad Fux (@eldadfux)](https://twitter.com/eldadfux) or [@appwrite_io](https://twitter.com/appwrite_io) on Twitter, and anyone from the [Appwrite team on Discord](https://discord.gg/GSeTUeA). You can also submit an issue, and a maintainer can guide you!
88

9-
You can get an in-depth understanding of Utopia HTTP in our [Getting Started](docs/Getting-Starting-Guide.md) guide.
10-
119
## Code of Conduct
1210

13-
Help us keep Utopia HTTP open and inclusive. Please read and follow our [Code of Conduct](/CODE_OF_CONDUCT.md).
11+
Help us keep Utopia Validators open and inclusive. Please read and follow our [Code of Conduct](/CODE_OF_CONDUCT.md).
1412

1513
## Submit a Pull Request πŸš€
1614

@@ -66,14 +64,11 @@ $ git push origin [name_of_your_new_branch]
6664

6765
### Testing
6866

69-
- `docker compose up -d`
70-
- `docker compose exec fpm vendor/bin/phpunit --configuration phpunit.xml`
71-
- `docker compose exec swoole vendor/bin/phpunit --configuration phpunit.xml`
72-
- `docker compose exec swoole-coroutine vendor/bin/phpunit --configuration phpunit.xml`
67+
- `composer test`
7368

7469
## Introducing New Features
7570

76-
We would πŸ’– you to contribute to Utopia HTTP, but we would also like to make sure this library is as great as possible and loyal to its vision and mission statement πŸ™.
71+
We would πŸ’– you to contribute to Utopia Validators, but we would also like to make sure this library is as great as possible and loyal to its vision and mission statement πŸ™.
7772

7873
For us to find the right balance, please open an issue explaining your ideas before introducing a new pull request.
7974

@@ -107,4 +102,4 @@ Submitting documentation updates, enhancements, designs, or bug fixes. Spelling
107102

108103
### Helping Someone
109104

110-
Searching for Utopia HTTP on Discord, GitHub, or StackOverflow and helping someone else who needs help. You can also help by teaching others how to contribute to this repo!
105+
Searching for Utopia Validators on Discord, GitHub, or StackOverflow and helping someone else who needs help. You can also help by teaching others how to contribute to this repo!

β€ŽDockerfile.fpmβ€Ž

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

β€ŽDockerfile.swooleβ€Ž

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

β€ŽDockerfile.swoole_coroutinesβ€Ž

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

0 commit comments

Comments
Β (0)