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

[Variation] - return transformed options as array to avoid side-effects #5009

Merged

Conversation

nakashu
Copy link
Contributor

@nakashu nakashu commented May 12, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? no
Related tickets partially #4791
License MIT

As described in #4791 - when changes are made on Option returned from the transformer, it can have side effects - eg. Variant option values will change upon persist

Returning options as array will, remove reference of the persistent collection and no side effects will occur.

…and avoid side effects, when Option data are changed
@pjedrzejewski
Copy link
Member

Nice! I have restarted one build - it failed for no reason. :)

@michalmarcinkowski michalmarcinkowski merged commit a3ec89a into Sylius:master May 12, 2016
@michalmarcinkowski
Copy link
Contributor

Thanks you @nakashu! 👍

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.

None yet

3 participants