You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a brainstorm of ideas for improving Pico's config system and making it modular.
Process all files in the config folder.
Loading order shouldn't matter. Any file should be of equal importance, and not nested together.
Depending on how this system works, Pico's core config could either be loaded at any time or prioritized to load first. If done right, I feel this shouldn't matter.
Rename Pico's core config to 'core-config.php' or whatever new file extension is decided on.
Make sure not to load any sample files. Perhaps standardize the naming scheme of samples for future plugins and themes. (For some reason, I really want to call 'plugins and themes' 'extensions').
Pros
This would allow users to update the config for their themes and plugins without touching their main Pico config.
It would also make removal of plugins and themes easier due to their config being stored separately and easily deleted.
Cons
This could result in unintentional loading of files (misplaced, misconfigured, or left behind).
Switch Pico's config to another format.
Use something more user-friendly than PHP for configuration?
Preferably something more error-tolerant? Something where a single missing comma cannot bring down an entire Pico site.
Despite format change, keep configuration just as powerful. Make sure not to lose abilities, such as making arrays, that plugin and theme developers may rely on.
Pros
A new format could make Pico's configuration easier for new users.
It could make plugin and theme development easier.
Cons
Changing it could estrange developers, especially if they found it less powerful than PHP.
The text was updated successfully, but these errors were encountered:
Resolves#330
After loading the `config/config.php`, Pico proceeds with any existing `config/*.config.php` in alphabetical order. The file order is crucial: Config values which has been set already, cannot be overwritten by a succeeding file. This is also true for arrays, i.e. when specifying `$config['test'] = array('foo' => 'bar')` in `config/a.config.php` and `$config['test'] = array('baz' => 42)` in `config/b.config.php`, `$config['test']['baz']` will be undefined
This feature will be shipped with Pico 1.1, see 988a23f for implementation details. For feedback about this feature, please refer to #334. Thanks @smcdougall for bringing this up!
Update: This feature will still be shipped with Pico 1.1 2.0, however, with a different approach. See 9b7523b for implementation details. For feedback about this feature, please refer to #334. Thanks @smcdougall for further feedback about this there!
Here's a brainstorm of ideas for improving Pico's config system and making it modular.
The text was updated successfully, but these errors were encountered: