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

Normalizers should not throw an errors #57

Open
adrenalinkin opened this issue Sep 11, 2021 · 0 comments
Open

Normalizers should not throw an errors #57

adrenalinkin opened this issue Sep 11, 2021 · 0 comments
Assignees
Labels
BC This will break compatibility
Milestone

Comments

@adrenalinkin
Copy link
Owner

Normalizers should not throw an errors - we already have Validators for this purpose. Better return value as is in that case when normalizer can't perform normalization.
Also we should not analyse is this property required or not.
According to this information contract will be pretty simple

public function supports(Schema $propertySchema, string $propertyName): bool;
public function getNormalizer(): Closure;
@adrenalinkin adrenalinkin added the BC This will break compatibility label Sep 11, 2021
@adrenalinkin adrenalinkin added this to the 1.0.0 milestone Sep 11, 2021
@adrenalinkin adrenalinkin self-assigned this Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC This will break compatibility
Projects
None yet
Development

No branches or pull requests

1 participant