byrokrat / giroapp

Command line app for managing autogiro donations.
GNU General Public License v3.0
4 stars 2 forks source link

Validate donor state transitions using a state machine #166

Closed hanneskod closed 5 years ago

hanneskod commented 6 years ago

As there is now there are many complicated buisiness rules as regards to what state can be entered where spred out in different parts of the code.

For example in PauseCommand donor state is inspected to see if donor can be paused.

This logic needs to be centralized. What if we want to allow for new state transitions, we would then have to do multiple and error prone edits..

See the symfony workflow component. As that could be a starting point..

hanneskod commented 6 years ago

61 #124 #13 #46