make build
make up
make sh
(if you're not in the php container allready)
php bin/console doctrine:database:create
php bin/console doctrine:schema:update --force
php bin/console doctrine:fixtures:load -n
POST https://localhost/api/register
{
"email": "[email protected]",
"password": "B2#Etw8BN3zi"
}
POST https://localhost/api/login_check
{
"email": "[email protected]",
"password": "B2#Etw8BN3zi"
}
Summary of Association Override, Attribute Override, Mapped Superclasses
EntityA EntityB Example using InheritanceType
in mode SINGLE_TABLE
PR related: #1
EntityX EntityY EntityZ Example using MappedSuperclass
on abstract class
classDiagram
EntityX --> EntityY
EntityX --> EntityZ
class EntityX ~abstract~
EntityX : +User author
EntityX : +string name
class EntityY
EntityY : +string recipient
class EntityZ
EntityZ : +Collection recipients
Example of
MappedSuperclass
and Get Collection of EntityY and EntityZ on same GetCollection- Automatically applies the author with the Interface
AuthorInterface.php
and the SubscriberAttachAuthorSubscriber
PR related: #2
Mail MailIncoming MailOutcoming of 🚀 InheritanceType
in mode JOINED
classDiagram
Mail --> MailIncoming
Mail --> MailOutcoming
class Mail
Mail : +User author
Mail : +string subject
class MailIncoming
MailIncoming : +string sender
MailIncoming : +Collection recipients
class MailOutcoming
MailOutcoming : +User sender
MailOutcoming : +string recipient
PR related: #3
curl -X 'GET' \
'https://localhost/api/users?page=1' \
-H 'accept: text/dino'
curl -X 'GET' \
'https://localhost/api/users?page=1' \
-H 'accept: text/csv'
PR related: #4
"hydra:description": "Unable to generate an IRI for the item of type \"App\\Entity\\EntityB\""
This was happening because the entity was never being saved, so the id was never generated.
https://stackoverflow.com/questions/57887026/unable-to-generate-an-iri-for-the-item-of-type-exception-after-api-platform-mi
UniqueEntity('email')
php bin/console hautelook:fixtures:load
POST https://localhost/api/entity_bs
- fork from dunglas/symfony-docker
- install doctrine, api-platform, fixtures
composer require symfony/orm-pack
composer require --dev symfony/maker-bundle
-
Creation Book entity + fixtures
- filter on
category[]
- filter on
-
Install Lexik JWT
composer require "lexik/jwt-authentication-bundle"
php bin/console lexik:jwt:generate-keypair
je créé une discussion
- j'informe les autres qu'il y a une discussion
je créé un message :
- j'informe les autres qu'il y a un message
je li un message :
- je mets a read discussion
- je mets a read message
On créé un message avec DiscussionPostProcessor.php
et le payload suivant
{
"content": "{{$randomLoremSentences}}",
"participants": [
"/api/users/17325",
"/api/users/17327"
]
}
- On créé une discussion, avec DiscussionPostProcessor.php
- Les participants lisent avec ReadMessageNotificationListener.php
- On créé un message avec CreateMessageNotificationListener.php
Amélioration : supprimer MessageNotification une fois lue ?
POST /api/discussions
{
"content": "Fuga ducimus debitis fuga quis sint similique dolores."
}
POST /api/discussions/{id}/message
{
"content": "Hic ut et excepturi molestias amet sit."
}
-
mail confirmation
-
resend mail confirmation (expiration date)
-
password forgot
-
change password forgot
-
update mail (resend confirmation mail + expiration date)
-
update password (need current password)
- multipart
- enum instead array in Book $category
- hydrate the results by iri
- paginate results
- order results
- filter results