-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add versioning to dimension content #202
base: 0.8
Are you sure you want to change the base?
Conversation
9967ada
to
651aa2a
Compare
// +---+ +---+ | | restore | | | ||
// restore publish | +----------------------+ | | ||
// | publish | | ||
// +--------------------------------------------------------------------+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See whole Graphic
/cc @wachterjohannes not sure if even possible have a transition with the same name with different source and target state?
published ----restore---> draft
unpublished ----restore---> unpublished
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Restore version a workflow transition?
Answer in my opinion - yes - it should be if possible
if even possible have a transition with the same name with different source and target state?
Yes it is for multiple sources - but as i know only to a single destination. So your example i dont think its possible (maybe with a guard or a listener which sets the destination dynamically by using the further state?)
c257000
to
5d06dd5
Compare
Pull Request Test Coverage Report for Build 1298710368
💛 - Coveralls |
ce78edb
to
fbb4d74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
am i right when i say the restore itself is not build until now? only the save to a new version during publishing?
@@ -68,6 +77,21 @@ public function onPublish(TransitionEvent $transitionEvent): void | |||
|
|||
$dimensionAttributes['stage'] = DimensionContentInterface::STAGE_LIVE; | |||
|
|||
// create new version | |||
// TODO optimize latest version and publish locales on write process to avoid loading them here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 we should optimize this information
$contentRichEntity, | ||
\array_merge($dimensionAttributes, ['locale' => $publishLocale]), | ||
$contentRichEntity, | ||
\array_merge($dimensionAttributes, ['locale' => $publishLocale, 'version' => $version]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 nice solution with the version as attribute
Content/Infrastructure/Doctrine/DimensionContentQueryEnhancer.php
Outdated
Show resolved
Hide resolved
Tests/Application/ExampleTestBundle/Repository/ExampleRepository.php
Outdated
Show resolved
Hide resolved
Yes
Yes
Would say no - as long as the implementation of the custom entity wont get to complex (doesnt look like as the moment) at the end this should be a basic and integrated feature for all entities.
Already answered in the review above.
Would say no - But we should discuss that with @chirimoya because of the problem that the table can get really big (bigger than it is already). But that problem we also have with the current phpcr implementation (at least with doctrine dbal storage) |
fbb4d74
to
695b797
Compare
Build on top of: #190
To be discussed:
TODO: