WIP: feature_paste #1

Draft
Miroslavsckaya wants to merge 24 commits from feature_paste into master
Showing only changes of commit d68ec5a333 - Show all commits

View file

@ -11,14 +11,12 @@ class PasteFormData
{ {
#[Assert\NotBlank] #[Assert\NotBlank]
public string $text; public string $text;
#[Assert\Type(\boolean::class)]
public bool $private; public bool $private;
skobkin marked this conversation as resolved Outdated

Huh?

Huh?
public ?string $language = null; public ?string $language = null;
public ?string $description = null; public ?string $description = null;
public ?string $filename = null; public ?string $filename = null;
#[Assert\NotBlank] #[Assert\NotBlank]
public string $author = 'anonymous'; public string $author = 'anonymous';
#[Assert\Type(\DateTimeImmutable::class)]
public ?\DateTimeImmutable $expirationDate; public ?\DateTimeImmutable $expirationDate;
skobkin marked this conversation as resolved
Review

Why string and Assert\NotBlank?

Why `string` and `Assert\NotBlank`?
public string $ip; public string $ip;
skobkin marked this conversation as resolved
Review

Is this validation being processed BEFORE storing the data in the DTO?
If not, it's pointless as with bool field earlier.

Is this validation being processed BEFORE storing the data in the DTO? If not, it's pointless as with `bool` field earlier.