-
Notifications
You must be signed in to change notification settings - Fork 325
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
Using Symfony configuration for webspaces #7218
base: 3.0
Are you sure you want to change the base?
Conversation
->addDefaultsIfNotSet() | ||
->children() | ||
->scalarNode('config_dir') | ||
->defaultValue('%kernel.project_dir%/config/webspaces') |
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.
Add this directory to the kernel maybe to also load webspaces from there?
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.
I don't think we can do that in Sulu code?
3722ee9
to
dbd4952
Compare
@@ -36,7 +40,7 @@ | |||
</navigation> | |||
|
|||
<resource-locator> | |||
<strategy>short</strategy> |
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 that a real strategy? If so, then I couldn't find any classes implementing the strategy.
8897e86
to
cfeda49
Compare
9e5d959
to
8cc538f
Compare
8cc538f
to
e90abb2
Compare
src/Sulu/Component/Webspace/Tests/Unit/Manager/WebspaceCollectionCache.php
Show resolved
Hide resolved
e09f570
to
bf67a98
Compare
@@ -17,7 +17,7 @@ interface SystemStoreInterface | |||
{ | |||
public function getSystem(): ?string; | |||
|
|||
public function setSystem(string $system): void; | |||
public function setSystem(?string $system): void; |
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.
BC break
8dd5614
to
1793fd1
Compare
1793fd1
to
fbb3645
Compare
Migration guide
<webspace xmlns="http://schemas.sulu.io/webspace/webspace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.sulu.io/webspace/webspace http://schemas.sulu.io/webspace/webspace-1.1.xsd"> and replace it with this: <services:container xmlns="http://example.org/schema/dic/sulu_website"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:services="http://symfony.com/schema/dic/services"
xsi:schemaLocation="http://symfony.com/schema/dic/services
https://symfony.com/schema/dic/services/services-1.0.xsd"
>
<config>
<webspace>
</config>
</services:container> |
3580ad9
to
1ccf181
Compare
What's in this PR?
Creating a way to configure webspaces with Symfony configuration.
Why?
Currently Sulu has it's own XML parser for webspace configs. This is a lot of maintenance and hard to extend. Using the Symfony config solves both
Example Usage
Just write your configs like before. But now you can also use YAML and PHP.
To Do
Create a documentation PR
Make sublocales possible in the config (at most two)
Document this ^
Document how to extend the configuration
It should work with the same configuration as before
Making the
WebspaceCollection
read onlyChecking all Exceptions have been turned into validation