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

docs for config command should say more precisely that some features only work for the "extra" #11873

Open
joachim-n opened this issue Mar 5, 2024 · 5 comments

Comments

@joachim-n
Copy link

I tried the following commands to add data to a repository definition in my composer.json and all failed:

composer config repositories.my_repo.options.versions.my_package '4.0.17'
composer config repositories.my_repo  --merge '{"trunk-path": "master"}'

The docs at https://getcomposer.org/doc/03-cli.md#config make it sound like the --merge option and passing JSON and using nested keys will work.

The language used isn't clearly saying that these only work for setting data in the "extra". (At least that's what I deduce is going on.)

@Seldaek
Copy link
Member

Seldaek commented Mar 6, 2024

The help shows Merge the setting value with the current value, to be used with extra.* keys in combination with --json - that souds to me quite clear :D But yeah anyway editing repos is not fully possible. It's quite a bit of work to support all permutations and ultimately not super common..

@joachim-n
Copy link
Author

"to be used" sounds like "it's useful for working with extra.* keys rather than "it will ONLY work with extra.* keys"

@Seldaek
Copy link
Member

Seldaek commented Mar 6, 2024

Then feel free to PR clearer wording :)

@Seldaek Seldaek added this to the Nice To Have milestone Mar 6, 2024
@joachim-n
Copy link
Author

Will do. I wasn't sure if that was the case, or if I'd made a mistake in my command syntax.

While I'm at it -- are there any other flags which only work with certain sections of the config?

@Seldaek
Copy link
Member

Seldaek commented Mar 6, 2024 via email

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

No branches or pull requests

2 participants