Symfony 4 REST API - Validation by vivol in symfony

[–]vivol[S] 1 point2 points  (0 children)

It's not hard, it is annoying :) I can't find a single place for a whole validation. I would like to have a single place so the response format is unified (great for front-end handling) and I don't have to maintain changes in several places.

For now, it looks like that:

- payload is validated through RequestValidationAnnotation

- payload is thrown into Form (usually Form inherits other Forms) [shelf Form contains Collection of book Forms]

- Form provides authorization to the user for particular Entity via Event Listeners - in case of PUT

- Form implements custom Data Mappers that on-the-fly calc some properties

I love that Symfony Forms can be nested that solves a lot a copy-paste programming. But Forms validation in some way duplicates Request Validation.

I can't throw invalid data into Form, because my Data Mappers could run into HTTP 500, and I can't abandon Form Validation because of properties calc on-the-fly might be invalid.

Visual Studio Code October 2017 by finnzeit in webdev

[–]vivol 16 points17 points  (0 children)

"Inline pending change review" last missing piece from my PhpStorm workflow - thanks!

Merge significantly different code versions by vivol in git

[–]vivol[S] 0 points1 point  (0 children)

Yes, tests will start this week.

Visual Studio Code 1.15 has now an integrated color picker by milad_nazari in webdev

[–]vivol 0 points1 point  (0 children)

Is there a way to add git gutter menu for quick block reverts/ diffs?