-
Notifications
You must be signed in to change notification settings - Fork 350
Add Versioning to the ContentBundle #8054
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
Conversation
@@ -51,7 +51,7 @@ public function removeLegacyPageAdmin(ContainerBuilder $container): void | |||
$definition = $methodCall[1][0]; | |||
if ($definition instanceof Definition) { | |||
$class = $definition->getClass(); | |||
if ('%sulu_page.admin.class%' === $class) { | |||
if ('Sulu\Bundle\PageBundle\Admin\PageAdmin' === $class) { |
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.
This was overseen when removing the class parameters
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.
use PageAdmin::class
packages/page/assets/js/views/List/itemActions/RestoreVersionItemAction.js
Show resolved
Hide resolved
...undle/AdminBundle/Resources/js/containers/List/fieldTransformers/DateTimeFieldTransformer.js
Outdated
Show resolved
Hide resolved
packages/content/src/Application/ContentWorkflow/Subscriber/PublishTransitionSubscriber.php
Outdated
Show resolved
Hide resolved
packages/page/src/Infrastructure/Symfony/HttpKernel/SuluPageBundle.php
Outdated
Show resolved
Hide resolved
e95e4e5
to
76aa519
Compare
04b4816
to
77b63f9
Compare
as discussed I would backport the JS changes to 2.6 branch :) |
see #8060 I'll revert it in this branch as soon as the other MR is merged into the 3.0 branch :) |
1470f4c
to
1e10e69
Compare
@@ -21,6 +21,8 @@ interface DimensionContentInterface | |||
public const STAGE_DRAFT = 'draft'; | |||
public const STAGE_LIVE = 'live'; | |||
|
|||
public const DEFAULT_VERSION = 0; |
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.
public const DEFAULT_VERSION = 0; | |
public const CURRENT_VERSION = 0; |
@@ -40,6 +40,8 @@ trait DimensionContentTrait | |||
*/ | |||
private $isMerged = false; | |||
|
|||
private int $version = DimensionContentInterface::DEFAULT_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.
private int $version = DimensionContentInterface::DEFAULT_VERSION; | |
private int $version = DimensionContentInterface::CURRENT_VERSION; |
public static function getDefaultDimensionAttributes(): array | ||
{ | ||
return [ | ||
'locale' => null, | ||
'stage' => DimensionContentInterface::STAGE_DRAFT, | ||
'version' => DimensionContentInterface::DEFAULT_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.
'version' => DimensionContentInterface::DEFAULT_VERSION, | |
'version' => DimensionContentInterface::CURRENT_VERSION, |
SecurityCheckerInterface $securityChecker, | ||
array $settingsForms | ||
private ViewBuilderFactoryInterface $viewBuilderFactory, | ||
private ActivityViewBuilderFactoryInterface $activityViewBuilderFactory, |
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.
didn't we say its responsoble of page, article and snippet admin to add activity to the insights? and content bundle doesnt know about the activities?
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.
the example bundle seems to miss some changes like the list update.
also think functional test in the ExampleControllerTest
is missing?
1e10e69
to
e462520
Compare
# Conflicts: # packages/content/src/Infrastructure/Doctrine/DimensionContentQueryEnhancer.php # Conflicts: # packages/page/src/Domain/Model/PageDimensionContent.php # packages/page/src/Domain/Model/PageDimensionContentInterface.php
# Conflicts: # packages/article/src/Domain/Model/ArticleDimensionContentInterface.php # src/Sulu/Bundle/AdminBundle/Resources/js/containers/List/fieldTransformers/DateTimeFieldTransformer.js
e462520
to
bcfd5a8
Compare
What's in this PR?
Adds Versioning to content-bundle entities
Why?
To Do