.composer/config for configuration options #513

Closed
ruimarinho opened this Issue Mar 29, 2012 · 4 comments

Comments

Projects
None yet
3 participants

With the increasing amount of options, both related to projects and the system, it seems like relying on ENV vars will only cause pain in the very near future. Since Git pretty much nailed this by using a global gitconfig under the user home dir and a project-based git-config on the root of the project itself, I wonder if this exact model doesn't make sense for Composer too?

Some ideas came to mind:

// ~/.composer/config

[core]
  autoupdate = true # auto self-update
  prefersource = true # always prefer source
  validateoninstall = true # always validate composer.json before executing the install command

[package "symfony/symfony"]
  assetsinstall = 'symlink'

What do you think?

Contributor

stloyd commented Mar 30, 2012

Sounds interesting. But IMO if we would try to implement such "config" it should be first "project-based", later it could be pretty easy extended into "global" one.

Owner

Seldaek commented Mar 30, 2012

We will need a ~/.composer dir sooner or later for caching stuff, so the config could go in there. Project config could just be .composer I guess, but I'm not sure if project config makes sense. Depends on what we consider config I guess.

I've updated the configuration to better indicate that the vendors config would possibly be configured as a section (like branch or mergetool). I see the project config only as a way to override the global config.

@Seldaek Seldaek closed this in e638182 Apr 9, 2012

Owner

Seldaek commented Apr 9, 2012

This is now fixed, added three new tickets (#552, #553, #554) to expand on this feature.

digitalkaoz pushed a commit to digitalkaoz/composer that referenced this issue Apr 10, 2012

Merge pull request #551 from Seldaek/config
Add Config class and system-wide config management, fixes #513

digitalkaoz pushed a commit to digitalkaoz/composer that referenced this issue Nov 22, 2013

digitalkaoz pushed a commit to digitalkaoz/composer that referenced this issue Nov 22, 2013

Merge pull request #551 from Seldaek/config
Add Config class and system-wide config management, fixes #513
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment