Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Simplify code generation command #3462

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Conversation

simonschaufi
Copy link
Collaborator

No description provided.

@simonschaufi
Copy link
Collaborator Author

@sabbelasichon I'm throwing a lot of code away and improve the whole code generation by using simple strings and making use of validators where they belong instead of within the normalizer where they were before. Are you ok with the change?

@sabbelasichon
Copy link
Owner

@simonschaufi: I love Value Objects but in this case i don´t know why these value objects are not self validating. I.e. why is the Url Value Object not asserting that the parameter is a valid Url. Why does the description VO is not validating the min and max length? I think the value objects are not valuable in this case, but should be. Throw them away or refactor them to be self validating.

@simonschaufi
Copy link
Collaborator Author

simonschaufi commented Oct 11, 2023

The problem is that there were assertions in them before but when you do something wrong, you have to start all over again which is really annoying. Now you actually have 3 tries until the question exits. That's also in the symfony documentation. No validation in the normaliser! Once you extract the validation out off them, they become useless.

@simonschaufi simonschaufi merged commit 34e6e56 into main Oct 12, 2023
16 checks passed
@simonschaufi simonschaufi deleted the simple-code-generation branch October 12, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants