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

fix: compare when name is the same but not variant #258

Merged
merged 3 commits into from
Dec 20, 2021

Conversation

Snowbaha
Copy link
Contributor

@Snowbaha Snowbaha commented Nov 2, 2021

When the name, price and tax are the same whereas the variant is not the same, it's merged. The fix compare the variant to be sure.

When the name, price and tax are the same whereas the variant is not the same, it's merged. The fix compare the variant to be sure.
@GSadee
Copy link
Member

GSadee commented Nov 30, 2021

@Snowbaha thank you for your contribution, can you rebase the PR with master and fix the build by adjusting failing PHPSpec to your changes?

@Snowbaha
Copy link
Contributor Author

I am not the more confident with PHPSpec :(

@GSadee
Copy link
Member

GSadee commented Nov 30, 2021

You need to adjust this spec: https:/Sylius/InvoicingPlugin/blob/master/spec/Entity/LineItemSpec.php#L94:L108 to use there a variant code that you've added to LineItem compare method, I encourage you to try 😃

@Snowbaha
Copy link
Contributor Author

I tried, tell me if it is ok?

@GSadee
Copy link
Member

GSadee commented Dec 1, 2021

I tried, tell me if it is ok?

Yup, it looks OK 😃 but... there is also a need to adjust it_merges_with_another_line_item method in this spec because of added checking variant's code

@Snowbaha
Copy link
Contributor Author

Snowbaha commented Dec 1, 2021

it shoudl be ok! :)

@GSadee GSadee merged commit cd8f507 into Sylius:master Dec 20, 2021
@GSadee
Copy link
Member

GSadee commented Dec 20, 2021

Thank you, Julien! 🎉

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