Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
363a2f0
added getCollectionSize method for mysql mariadb postgres and mongodb…
faisalill May 20, 2023
880d3cb
added test
faisalill May 22, 2023
3f6bdef
fixed stuff
faisalill May 22, 2023
b47e34e
better error
faisalill May 22, 2023
962db9b
Merge pull request #1 from faisalill/get-collection-size
faisalill May 22, 2023
86765f3
same README.md
faisalill May 22, 2023
759795e
better readme until create a collection
faisalill May 22, 2023
00554b1
fixed stuff
faisalill May 23, 2023
851463f
better readme until documents, added try catch blocks for few
faisalill May 23, 2023
cee14f3
better readme, document and relations methods pending
faisalill May 23, 2023
706d64c
readme finished
faisalill May 24, 2023
639cc68
finished tests
faisalill May 25, 2023
8866b97
fixed stuff
faisalill May 25, 2023
d911321
removed try catch
faisalill May 25, 2023
aa1107e
added more methods
faisalill May 25, 2023
8dedb45
removed readme
faisalill May 25, 2023
763e8a4
added readme
faisalill May 25, 2023
9fc188a
removed collection size
faisalill May 26, 2023
9e933b6
Merge branch 'utopia-php:main' into better-readme
faisalill May 26, 2023
63c84f9
remove templates
faisalill May 27, 2023
14d7e7f
added readme
faisalill May 27, 2023
85ec5ce
better readme
faisalill May 27, 2023
1913805
updated docs
faisalill May 29, 2023
79ac692
fixed stuff
faisalill May 30, 2023
4af9575
Merge branch 'utopia-php:main' into better-readme
faisalill Jun 1, 2023
64538d1
Merge branch 'utopia-php:main' into better-readme
faisalill Jun 18, 2023
8b982e1
added more methods
faisalill Jul 10, 2023
28f4fb4
fixed indentation
faisalill Jul 10, 2023
a219a71
removed types in array
faisalill Jul 13, 2023
4e5fde1
removed event types array and changed stuff
faisalill Jul 17, 2023
2f53ddd
Merge branch 'utopia-php:main' into better-readme
faisalill Jul 18, 2023
1c9dfc0
Improve Navigation and Enhance the documentation
faisalill Jul 18, 2023
e5a5849
Remove table of contents and Enhance the readme and contributing.md
faisalill Jul 19, 2023
0d10f7d
Fix Indentation and Remove colon from headings
faisalill Jul 19, 2023
21f173d
Move Limitations section below Supported databases section
faisalill Jul 19, 2023
314b650
Merge branch 'utopia-php:main' into better-readme
faisalill Jul 22, 2023
838011c
Change Supported Databases table back to Horizontal
faisalill Jul 22, 2023
4306ed5
Change Legends in Supported Datbases to vertical
faisalill Jul 22, 2023
fe06656
Made changes as per review
faisalill Jul 26, 2023
c339892
Fix Role indentation
faisalill Jul 26, 2023
52b38ad
Add note to Document Set Types
faisalill Jul 26, 2023
927db4f
Remove extra brackets
faisalill Jul 26, 2023
7c3b5c5
Update README.md
abnegate Jul 26, 2023
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
74 changes: 74 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,80 @@ This is also important for the Utopia-php lead developers to be able to give tec

You can follow our [Adding new Database Adapter](docs/add-new-adapter.md) tutorial to add new database support in this library.

## Tests

To run tests, you first need to bring up the example Docker stack with the following command:

```bash
docker compose up -d --build
```

To run all unit tests, use the following Docker command:

```bash
docker compose exec tests vendor/bin/phpunit --configuration phpunit.xml tests
```

To run tests for a single file, use the following Docker command structure:

```bash
docker compose exec tests vendor/bin/phpunit --configuration phpunit.xml tests/Database/[FILE_PATH]
```

To run static code analysis, use the following phpstan command:

```bash
composer check
```

### Load testing

Three commands have been added to `bin/` to fill, index, and query the DB to test changes:

- `bin/load` invokes `bin/tasks/load.php`
- `bin/index` invokes `bin/tasks/index.php`
- `bin/query` invokes `bin/tasks/query.php`

To test your DB changes under load:

#### Load the database

```bash
docker compose exec tests bin/load --adapter=[adapter] --limit=[limit] [--name=[name]]

# [adapter]: either 'mongodb' or 'mariadb', no quotes
# [limit]: integer of total documents to generate
# [name]: (optional) name for new database
```

#### Create indexes

```bash
docker compose exec tests bin/index --adapter=[adapter] --name=[name]

# [adapter]: either 'mongodb' or 'mariadb', no quotes
# [name]: name of filled database by bin/load
```

#### Run Query Suite

```bash
docker compose exec tests bin/query --adapter=[adapter] --limit=[limit] --name=[name]

# [adapter]: either 'mongodb' or 'mariadb', no quotes
# [limit]: integer of query limit (default 25)
# [name]: name of filled database by bin/load
```

#### Visualize Query Results

```bash
docker compose exec tests bin/compare
```

Navigate to `localhost:8708` to visualize query results.


## Other Ways to Help

Pull requests are great, but there are many other areas where you can help Utopia-php.
Expand Down
Loading