Skip to content
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

Support config deep merging and inheritance #2496

Merged
merged 4 commits into from Feb 24, 2016

Conversation

@danielbachhuber
Copy link
Member

commented Feb 21, 2016

A config.yml, wp-cli.yml or wp-cli.local.yml configuration file now supports two configuration parameters:

_:
  merge: true
  inherit: <file>.yml

merge will merge any argument definition, fixing #2069.

inherit supports inheriting an arbitrary YAML file, fixing #1063

@danielbachhuber danielbachhuber changed the title Merge project config into global config when latter is already set Support deep config merging and inheritance Feb 21, 2016

@danielbachhuber danielbachhuber added this to the 0.23.0 milestone Feb 21, 2016

"""
cli config:
inherit: wp-cli.yml
merge: true

This comment has been minimized.

Copy link
@danielbachhuber

danielbachhuber Feb 21, 2016

Author Member

@wp-cli/committers Ideas on a better way to define these config file arguments? I like their intent, but I'm not completely happy with this implementation.

Another option would be to make them top-level arguments, e.g:

inherit: wp-cli.yml

However, this has the potential to conflict with argument definition for a command called inherit

@danielbachhuber danielbachhuber changed the title Support deep config merging and inheritance Support config deep merging and inheritance Feb 24, 2016

Use `_` to denote config config
`_` is unlikely to ever be a command, and is colloquially understood to
be "private"
danielbachhuber added a commit that referenced this pull request Feb 24, 2016
Merge pull request #2496 from wp-cli/2069-config-inheritance
Support config deep merging and inheritance

@danielbachhuber danielbachhuber merged commit 0f5fae1 into master Feb 24, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@danielbachhuber danielbachhuber deleted the 2069-config-inheritance branch Feb 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.