-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Theme] Support for settings #4873
Conversation
83ac7ff
to
e75c7f7
Compare
43d012d
to
b54117f
Compare
We cannot use anonymous classes from PHP 7
b54117f
to
463ad00
Compare
Awesome work, could we add notes to UPGRADE file about settings changes? I think it would be useful for people upgrading. /cc @steffenbrem |
97051f9
to
bf1aba5
Compare
@pjedrzejewski here it goes 🌵 |
@pamil Isn't it a better way to ditch the Have a If you build it that way, you have a much more powerful setup and you could easily implement things like saving theme settings as draft, as in versioning the themes settings. I am using the settings bundle for themes myself and the above solution works wonderful. I think it is worth considering if you also want that approach in Sylius. The current approach limits the power of theme settings I think. |
You would also need a |
Having a relationship on a theme wouldn't be a solution right now as I've just opened #4897 which deletes the filesystem -> database synchronization, which has caused a lot of confusion and weird technical decision like I may miss something in the approach you proposed, does it mean that there will be a schemaAlias |
@pamil Ah okay, yeah if you don't have a theme reference in the database it does not make much sense to do it the way I described. But for what it's worth, you would indeed have a Settings would not be coupled to themes, since you would just have an |
Anyway, do you know what are the example use-cases for settings namespaces? |
Personally I would only use namespaces when I want to simply store multiple different settings somewhere, but can't link the settings to an existing entity. I never hit that issue, can't think of an use case that shares the same schema and needs to be different (having multiple "instances") without being related to an entity. |
Thanks! 🎉 At first I thought it might be wise to have namespace |
Nice work Kamil, thank you! |
sylius_settings_get
andsylius_settings_has
, renamedsylius_settings_all
tosylius_settings
)