Reputation: 3468
So, I followed Saldeak's answer to this question. I want to use my own fork in a project of the repo, however, during installation I get conflicting requirements.
$ composer update zfcampus/zf-content-validation
Loading composer repositories with package information Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- zfcampus/zf-apigility-admin 1.6.0 requires zfcampus/zf-content-validation ^1.4 -> satisfiable by zfcampus/zf-content-validation[1.7.x-dev, 1.6.x-dev].
- zfcampus/zf-apigility-admin 1.6.0 requires zfcampus/zf-content-validation ^1.4 -> satisfiable by zfcampus/zf-content-validation[1.7.x-dev, 1.6.x-dev].
- zfcampus/zf-apigility-admin 1.6.0 requires zfcampus/zf-content-validation ^1.4 -> satisfiable by zfcampus/zf-content-validation[1.7.x-dev, 1.6.x-dev].
- Can only install one of: zfcampus/zf-content-validation[1.7.x-dev, dev-alias-and-remove-empty-data].
- Can only install one of: zfcampus/zf-content-validation[1.6.x-dev, dev-alias-and-remove-empty-data].
- Can only install one of: zfcampus/zf-content-validation[1.7.x-dev, dev-alias-and-remove-empty-data].
- Can only install one of: zfcampus/zf-content-validation[1.6.x-dev, dev-alias-and-remove-empty-data].
- Installation request for zfcampus/zf-content-validation dev-alias-and-remove-empty-data -> satisfiable by zfcampus/zf-content-validation[dev-alias-and-remove-empty-data].
- Installation request for zfcampus/zf-apigility-admin (locked at 1.6.0, required as ^1.5.9) -> satisfiable by zfcampus/zf-apigility-admin[1.6.0].
In the composer.json
I require this:
"zfcampus/zf-content-validation": "dev-alias-and-remove-empty-data",
And the repo has been added to the list:
{
"type": "vcs",
"url": "[email protected]:rkeet/zf-content-validation.git"
}
I've tried to
composer remove zfcampus/zf-content-validation
composer require zfcampus/zf-content-validation:dev-alias-and-remove-empty-data
And
composer remove zfcampus/zf-content-validation
composer update zfcampus/zf-content-validation
But every time this comes back to the above error.
Notes:
composer.lock
to install latest of everything; there are more requirements than just this one that are tested for the installed versionsUpvotes: 2
Views: 142
Reputation: 22174
You need to alias your new branch as regular numeric branch, so it could be used to resolving requirements of other dependencies.
"zfcampus/zf-content-validation": "dev-alias-and-remove-empty-data as 1.7.x-dev",
After this Composer will treat your branch as 1.7
line, so it should match ^1.4
constraint.
See Require inline alias section in documentation.
Upvotes: 3