[Api] Unnecessary addresses should not be saved to the database while addressing an order#12719
Merged
GSadee merged 3 commits intoJun 30, 2021
Conversation
Contributor
Tomanhez
commented
Jun 18, 2021
| Q | A |
|---|---|
| Branch? | master |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| License | MIT |
GSadee
reviewed
Jun 18, 2021
pamil
reviewed
Jun 18, 2021
d3663ca to
2d4e640
Compare
2d4e640 to
4e17555
Compare
Zales0123
previously requested changes
Jun 21, 2021
arti0090
approved these changes
Jun 22, 2021
1162a76 to
ac6517b
Compare
GSadee
approved these changes
Jun 23, 2021
Zales0123
reviewed
Jun 23, 2021
SirDomin
reviewed
Jun 23, 2021
c7fa511 to
35125d7
Compare
stloyd
reviewed
Jun 24, 2021
| /** @var AddressInterface $newBillingAddress */ | ||
| $newBillingAddress = $addressOrder->billingAddress; | ||
| /** @var AddressInterface|null $newShippingAddress */ | ||
| $newShippingAddress = $addressOrder->shippingAddress ?? clone $newBillingAddress; |
Contributor
There was a problem hiding this comment.
Both assigns are pointless to be done here, and should be done in if's below not before them IMHO.
Contributor
There was a problem hiding this comment.
I believe the reason is that we need to type-hint them with Core/AddressInterface... Why these properties are type-hinted with Addressing/AddressInterface in the command?
stloyd
reviewed
Jun 24, 2021
d844c41 to
8c0bca1
Compare
Zales0123
reviewed
Jun 24, 2021
| /** @var AddressInterface $newBillingAddress */ | ||
| $newBillingAddress = $addressOrder->billingAddress; | ||
| /** @var AddressInterface|null $newShippingAddress */ | ||
| $newShippingAddress = $addressOrder->shippingAddress ?? clone $newBillingAddress; |
Contributor
There was a problem hiding this comment.
I believe the reason is that we need to type-hint them with Core/AddressInterface... Why these properties are type-hinted with Addressing/AddressInterface in the command?
8c0bca1 to
3ed4829
Compare
c484bdb to
34a5809
Compare
34a5809 to
d497968
Compare
GSadee
approved these changes
Jun 25, 2021
b1f8239 to
f4091f3
Compare
arti0090
approved these changes
Jun 29, 2021
f4091f3 to
7c596c0
Compare
7c596c0 to
a2d5c78
Compare
GSadee
approved these changes
Jun 30, 2021
| When the visitor changes the billing address to "Los Angeles", "Avenue", "90210", "United States" for "Jon Snow" | ||
| And the visitor completes the addressing step | ||
| Then the visitor should has "Los Angeles", "Avenue", "90210", "United States", "Jon Snow" specified as billing address | ||
| Then the visitor should has "Los Angeles", "Avenue", "90210", "United States", "Jon Snow" specified as shipping address |
Member
There was a problem hiding this comment.
Suggested change
| Then the visitor should has "Los Angeles", "Avenue", "90210", "United States", "Jon Snow" specified as shipping address | |
| And the visitor should has "Los Angeles", "Avenue", "90210", "United States", "Jon Snow" specified as shipping address |
I guess that your suggestions have been applied
Member
|
Thanks, Tomasz! 🥇 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.