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

[Address] Handle adress exists validation in case when address does not belong to any customer #706

Merged
merged 1 commit into from
Apr 22, 2021
Merged

Conversation

hurricane-voronin
Copy link
Contributor

@hurricane-voronin hurricane-voronin commented Mar 25, 2021

Hi there,
I've got an error during validation of address existence in case when it does not belong to any customer:
see AddressExistsValidator

if ($address->getCustomer()->getEmail() !== $user->getEmail()) {
    return $this->context->addViolation($constraint->message);
}

@hurricane-voronin hurricane-voronin requested a review from a team as a code owner March 25, 2021 14:17
@mamazu
Copy link
Member

mamazu commented Mar 26, 2021

Hey,
thanks for your contribution. This looks like an issue that should be fixed. Would you mind, to add tests for you new behaviour?

@diimpp
Copy link
Member

diimpp commented Mar 30, 2021

Fixes #705

@mamazu
Copy link
Member

mamazu commented Mar 31, 2021

I have pushed tests to this branch and it is ready to be merged.

@lchrusciel lchrusciel merged commit f50be88 into Sylius:master Apr 22, 2021
@lchrusciel
Copy link
Member

Thanks, Denys! 🥇

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.

4 participants