-
Notifications
You must be signed in to change notification settings - Fork 35
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
Separate "stages" logic and concept from "versions" logic and concept #475
Comments
I've spent a decent chunk of time looking at this, probably a goods days worth. IMO this is in the "too hard" basket, I'm not convinced the effort to benefit ratio is worthwhile here, and there are other things that we could spend our time on that would yield more for the time invested The Versioned class is really a large tangled knot of string and splitting it all apart into a pair of extensions, which, while it should make for cleaner code, it's a lot of work. I also can't help thinking that the split won't actually be that clean anyway as you have things like the "WasPublished" column on the _Versions table, which seems like it will naturally result in lots of I made a crude attempt to split everything into Versioned / Staged / Mode (temporary thing with both Versioned + Staged code), and split the giant Versioned class into a bunch of traits so that I could getting a better view of what's going on, before eventually giving up which link to this issue. The silverstripe/versioned PR is the relevant one in case anyones intereseted |
Right now most of the logic for both stages (draft, published) and versioning is held inside the same extension -
Versioned
.With that extension, you can have the following:
It isn't possible to have a separation between "Draft" and "Published" without recording version history.
What's more, the way these two separate concepts have been weaved together results in a lot of complexity both in the code itself and in the way developers need to reason about the code.
Related issues
Acceptance criteria
Versioned
extension no longer has "modes" it is either applied or it is not.DataObject
can have one, both, or neither of thePublishable
andVersioned
extensions, i.e. the two extensions combine nicely (i.e. when you publish you create a new version), and can be used separatelyNotes
The text was updated successfully, but these errors were encountered: