Skip to content

Feature: merge multiple config paths#49

Open
circulon wants to merge 2 commits into
masonitedev:5.0from
circulon:feature/merge_multiple_config_paths
Open

Feature: merge multiple config paths#49
circulon wants to merge 2 commits into
masonitedev:5.0from
circulon:feature/merge_multiple_config_paths

Conversation

@circulon

@circulon circulon commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

This PR provides the ability to "stack" config as a hierarchy.

The reason being that not all environments should contain every customisation in environmet vars.
This provides the ability to override specific keys in dicts and append items to lists in the config in a very simple and obvious way.

example loader:

self.application.bind("config.location", "config.base")
configuration = Configuration(self.application)
configuration.load([
    "config.environment.prod",
    "config/deployed",
])  

this will load and update the config in the following order from lowest to highest priority:

  • config.base
  • config.environment.prod
  • config.deployed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants