-
Notifications
You must be signed in to change notification settings - Fork 80
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 configuration for experimental content bundle storage #553
Add configuration for experimental content bundle storage #553
Conversation
5b516fb
to
c137268
Compare
c137268
to
2f80a90
Compare
2f80a90
to
4508a9f
Compare
bdf1a69
to
35fde55
Compare
e716e10
to
a3aa3e4
Compare
75e7ccc
to
ce6d9b8
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.
looks quite good 🙂
ArticleInterface::class => [ | ||
'generator' => 'schema', | ||
'options' => [ | ||
'route_schema' => '/{object["title"]}', |
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.
would use implode("-", object)
to match page behaviour
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 this then change also in the ExampleTestBundle in SuluContentBundle
$isPHPCRStorage = Configuration::ARTICLE_STORAGE_PHPCR === $storage; | ||
$isExperimentalStorage = Configuration::ARTICLE_STORAGE_EXPERIMENTAL === $storage; | ||
|
||
if ($isExperimentalStorage && $container->hasExtension('doctrine')) { |
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.
what do you think about creating a prependPHPCRStorage
and prependExperimentalStorage
method instead of adding all the conditions in this method? think that would be a bit easier to read
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 fine for me
$isPHPCRStorage = Configuration::ARTICLE_STORAGE_PHPCR === $storage; | ||
$isExperimentalStorage = Configuration::ARTICLE_STORAGE_EXPERIMENTAL === $storage; | ||
|
||
if ($isPHPCRStorage) { |
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.
same as above - think i would add a loadPHPCRStorage
and loadExperimentalStorage
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.
done
SuluArticleBundle.php
Outdated
{ | ||
$interfaces = []; | ||
|
||
if (Configuration::ARTICLE_STORAGE_EXPERIMENTAL === $container->getParameter('sulu_article.article_storage')) { |
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.
would probably add two methods here too 😇
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.
did created methods to get the specific compilerpasses
@@ -0,0 +1,4 @@ | |||
sulu_article: |
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.
would call the file config_experimental_storage
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.
done the call will be as mention futher down then.
@@ -0,0 +1,27 @@ | |||
sulu_route: |
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.
would call the file config_phpcr_storage
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.
done the call will be as mention futher down then.
|
||
public function __construct(string $environment, bool $debug, string $suluContext = SuluKernel::CONTEXT_ADMIN) | ||
{ | ||
$environmentParts = explode('_', $environment, 2); |
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 is not used anywhere yet, right?
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.
not yet but if we begin to write functional tests then I need to start the client or boot the kernel with the new environment.
$this->client = $this->createAuthenticatedClient(['environment' => 'test_experimental']);
or if we go with your suggestion it would be:
$this->client = $this->createAuthenticatedClient(['environment' => 'test_experimental_storage']);
a796d8a
to
cb701cb
Compare
cb701cb
to
3fcc381
Compare
sulu_article: | ||
article: | ||
storage: 'experimental' | ||
default_main_webspace: 'sulu_io' |
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.
not sure if this is needed? 🤔
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.
currently not will remove it in #554
What's in this PR?
Add alternative content bundle storage for articles.
Why?
Avoid requirement to elasticsearch and the need of knowledge about the phpcr.
Example Usage