docker compose build --no-cache
to build fresh imagesdocker compose up --pull always -d --wait
to start the projectdocker compose exec php bash
to enter into your symfony servicecomposer install
to install necessary dependencies
- Go to http://localhost:9001/
- Login with credentials written in .env (variables MINIO_ROOT_USER & MINIO_ROOT_PASSWORD)
- Create a bucket with same name as written in .env (variable MINIO_BUCKET)
We defined some conventions to always work in the same way.
HTTP Verb | URL | Action / controller method | Route name | Open api response description |
---|---|---|---|---|
GET | /articles | list | articles_list | Articles list |
POST | /articles | create | articles_create | Article created |
GET | /articles/{id} | get | articles_get | Article |
PATCH | /articles/{id} | update | articles_update | Article updated |
DELETE | /articles/{id} | delete | articles_delete | Article deleted |
Avoid nesting resources when it's possible :
- if a resource can be identified by its own id, do it
- if a resource is necessarily linked to another, you can nest
Good example :
Action | HTTP Verb | URL | Description |
---|---|---|---|
get | GET | /profiles/{profileId}/contents/{contentId} | Create a content in a profile |
delete | DELETE | /contents | Delete a content |
delete | DELETE | /profiles/{profileId}/contents/{contentId} | Remove a content from a profile |
Routes should only contain {variables} referring to controller entity. Good example :
File | Action | HTTP Verb | URL | Body |
---|---|---|---|---|
PackController | create | POST | /packs | {"profile_id": ... } |
ContentController | create | POST | /contents | {"profile_id": ... } |
Bad example :
File | Action | HTTP Verb | URL | Body |
---|---|---|---|---|
PackController | create | POST | /packs/{profileId} | {} |
ContentController | create | POST | /contents/{profileId} | {} |
Should indicate what content is returned Example :
HTTP Verb | URL | Code | Description |
---|---|---|---|
GET | /articles | 200 | List of articles |
POST | /articles | 201 | Created article |
POST | /article | 400 | Validation errors |