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

Have later configs replace earlier ones #45

Closed
far-blue opened this issue Jun 29, 2015 · 2 comments
Closed

Have later configs replace earlier ones #45

far-blue opened this issue Jun 29, 2015 · 2 comments
Milestone

Comments

@far-blue
Copy link
Contributor

When merging multiple config files it would be very useful to be able to replace an earlier definition with a later one - for example, a stable config with a definition for a stable package being overridden in a dev environment by a dev or beta version of the same package. The current merge implementation identifies the duplicates but then relies on Composer's Solver to find a compatible solution. I suggest a flag to change this with a 'replace' behaviour with 'last defined wins'.

@far-blue
Copy link
Contributor Author

Suggested implementation in #44

@far-blue
Copy link
Contributor Author

Implementation PR now #46

bd808 pushed a commit to bd808/composer-merge-plugin that referenced this issue Aug 12, 2015
Introduce a new `extra.merge-plugin.replace` configuration directive
that can be used to change the default conflict resolution mechanism.
When enabled, duplicate package declarations in merged files will
overwrite the declarations made in earlier files. Files are loaded in
the order specified in `extra.merge-plugin.include` with globbed files
being loaded in alphabetical order.

This behavior can be used to replace a default stable package with a dev
or beta version of the same package for testing.

Closes wikimedia#45
@bd808 bd808 closed this as completed in #53 Aug 12, 2015
@bd808 bd808 added this to the 1.3.0 milestone Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants