Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Core] Nullable customer on order#9578

Merged
pamil merged 1 commit into
Sylius:1.1from
lchrusciel:bc-fix
Jul 11, 2018
Merged

[Core] Nullable customer on order#9578
pamil merged 1 commit into
Sylius:1.1from
lchrusciel:bc-fix

Conversation

@lchrusciel
Copy link
Copy Markdown
Contributor

Q A
Branch? 1.1
Bug fix? yes
New feature? no
BC breaks? no
Deprecations?
Related tickets fixes #9577
License MIT

@pamil
Copy link
Copy Markdown
Contributor

pamil commented Jul 10, 2018

Could you target 1.1 with this fix?

@lchrusciel lchrusciel changed the base branch from master to 1.1 July 10, 2018 13:06
@pamil pamil added the Potential Bug Potential bugs or bugfixes, that needs to be reproduced. label Jul 10, 2018
@lchrusciel
Copy link
Copy Markdown
Contributor Author

It was meant for 1.1. Sorry 🙈

@pamil pamil added the BC Break label Jul 11, 2018
@pamil pamil merged commit 1405dec into Sylius:1.1 Jul 11, 2018
@pamil
Copy link
Copy Markdown
Contributor

pamil commented Jul 11, 2018

Thank you, Łukasz! 🥇

@teohhanhui
Copy link
Copy Markdown
Contributor

The intention is to allow attaching orders to non-customer resources, right?

@lchrusciel
Copy link
Copy Markdown
Contributor Author

It was a BC breaking change against 1.0, so we had to revert it. By default, it is not possible to assign a null as a customer during checkout in the default checkout process. However, you can customise it and then it is possible.

@teohhanhui
Copy link
Copy Markdown
Contributor

Yes, I understand that. But what I'm curious about is whether attaching orders to something other than a customer or a user (say, a company) is something you've thought about and whether that's designed for.

@lchrusciel
Copy link
Copy Markdown
Contributor Author

Not that I'm aware. Default Sylius implementation will be broken in that case, because we need an email to send a confirmation mail. But with a few customisations, it is possible (but I have never tried it). On the other hand, there is always some "Customer", even if it is not a person. Unless it is some POS, then we would need to customise checkout flow for this use-case.

I have noticed this bc break because on some custom development project we were assigning a customer from service which could return an instance of it or null. Right now, I'm allowed to do it without if statement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Potential Bug Potential bugs or bugfixes, that needs to be reproduced.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants