The configuration in D8 is nicely mapped in config schema file so any developer knows what configuration changes can be made. But what about state? Is there a recommended way to map state? Or is it the same situation as with variables in D7?

Would it be a good idea to store default values for state as part of the config schema under some specific key, like "state"? Althoguh that would mean dependency on config(factory) in different places within the code.

  • 2
    I'm not sure I understand what you are asking. "state", but definition, shouldn't be interesting to keep track of. That's the difference between config and state.
    – Letharion
    May 15 '15 at 13:01
  • state is per-site instance configuration. So it is not managable via files. But the website han have a lot of these configurations that are not listed anywhere. So I was thinking about how to make a list of all of them so any developer would just open a (schema?)file and see what state "Variable" there is and what is its purpose compared to manually searching for state service in the code and trying to figure out what the state "variable" is supposed to be.
    – user21641
    May 15 '15 at 14:54

There is no mapping/schema for state nor for the underlying key value system.

This question can't be "answered" other than saying "None". Anything else would need to be in the form of a feature request and I'm not convinced this makes sense.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy