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

Remove state machine gem from Spree::Payment (updated PR #2664) #3039

Closed
wants to merge 2 commits into from

Conversation

cedum
Copy link
Contributor

@cedum cedum commented Jan 16, 2019

This rebases from the latest master the PR #2664 by @jgayfer:

This PR removes the state machine gem from Spree::Payment while keeping the external API intact. The logic that was previously hidden within the state machine is now contained within the Spree::Payment model.

Please see #2656 for the rationale behind these changes.

James Gayfer added 2 commits January 29, 2019 22:21
While this spec will  pass, any additional attempts to save the payment
in question would fail as the Payment was not able to save on create
due to it being invalid (missing a source).
The state machine is a problem for a few reasons: transitions are hard
to understand and debug, transition order is tough to control, and
database transactions during a transition aren't well understood.
Removing it brings increased code clarity, as well as the ability to
more easily extend the functionality that was previously hidden by the
state machine.
@cedum cedum force-pushed the remove_payment_state_machine branch from 3111904 to 2dcd825 Compare January 29, 2019 21:23
@kennyadsl kennyadsl added this to the 3.0 milestone May 10, 2019
@kennyadsl
Copy link
Member

Closing in favor of #3356, thanks @cedum!

@kennyadsl kennyadsl closed this Oct 3, 2019
@cedum cedum deleted the remove_payment_state_machine branch October 4, 2019 15:51
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