Skip to content

Conversation

@butschster
Copy link
Member

This PR improves how configuration files are loaded in spiral/config. The new system makes config management more flexible and structured.

What's changed:

  • Introduced a new way to manage config directories and file loaders.
  • Added two loading strategies:
    • SingleFileStrategyLoader – loads the first available config file.
    • MergeFileStrategyLoader – finds and merges multiple config files.
  • Deprecated the old directory-based loader.
  • Updated tests to support the new logic.

These changes improve modularity and allow better handling of different configuration structures. 🚀

…age config directories and file loaders.

 - `SingleFileStrategyLoader` loads the first found config file.
- `MergeFileStrategyLoader` finds all matching config files and merges them.

The old way of loading configs is now deprecated. Tests updated to match new logic.
@butschster butschster moved this from Todo to In review in Spiral framework Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Load config based on APP_ENV

3 participants