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

Add support of dependencies resolution in the event of conflict #276

Closed
francoispluchino opened this issue Feb 19, 2017 · 1 comment
Closed
Assignees
Milestone

Comments

@francoispluchino
Copy link
Member

Bower include a resolution section to solve the conflicts between 2 same dependencies but with different versions.

As for NPM, it is possible to install several versions of the same dependency by different dependencies, which is not the case for Bower and Composer. Only the installation of a single version compatible for all dependencies (flatten) is possible.

The dependency resolution would force (replace) a version or range version directly in the root Composer package.

Example:

    "name": "foo/bar",
    "require": {
        "bower-asset/jquery": "^2.2.0"
    }
    "name": "bar/baz",
    "require": {
        "bower-asset/jquery": "2.0.0"
    }
    "name": "root/package",
    "require": {
        "foo/bar": "^1.0.0",
        "bar/baz": "^1.0.0"
    }
    "config": {
        "fxp-asset": {
            "resolutions": {
                "bower-asset/jquery": "^2.2.4"
            }
        }
    }

Currently Composer throws an exception indicating that only one version of dependency (bower-asset/jquery) can be installed. With the config.fxp-asset.resolutions option, all range versions of bower-asset/jquery dependency are replaced by the value in the resolutions config (^2.2.4).

@francoispluchino
Copy link
Member Author

Added by d65dabd.

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

No branches or pull requests

1 participant