-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Bug Fix] Added customer validator initializer to set canonical email #4747
[Bug Fix] Added customer validator initializer to set canonical email #4747
Conversation
@@ -208,6 +209,11 @@ | |||
<argument type="service" id="sylius.repository.customer" /> | |||
<tag name="validator.constraint_validator" alias="registered_user_validator" /> | |||
</service> | |||
|
|||
<service id="sylius.user.validator.customer_initializer" class="Sylius\Bundle\UserBundle\Validator\Initializer\CustomerInitializer"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use the class parameter set above :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, wow, that is stupid..
Great, could you please squash it to a single commit? Thank you Steffen! |
@pjedrzejewski You can do it too now: https://github.com/blog/2141-squash-your-commits |
@stloyd For some reason it does not work, I get that Travis check is required and we should not disable that. |
{ | ||
$customer->getEmail()->willReturn('sTeFfEn@gMaiL.CoM'); | ||
$canonicalizer->canonicalize('sTeFfEn@gMaiL.CoM') | ||
->shouldBeCalled() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldBeCalled
should be removed, willReturn
is enough.
You have to click on merge and then you will be able to select if you want to squash it. |
@steffenbrem The problem is that I have configured Travis as required check, and this prevents me from squashing it via UI. :/ |
… email canonical on initialisation. Customer object is now also validating against `emailCanonical` and uses `email` as it's error path.
4484227
to
9c5d944
Compare
Thanks Steffen! |
Added customer validator initializer that sets email canonical on initialisation. Customer object is now also validating against
emailCanonical
and usesemail
as it's error path.