Reputation: 2859
I want to add this tag from the branch 1.x
to my project.
I specified: "monolog/monolog": "dev-1.x#1.23.0"
And ran composer update monolog/monolog
Composer says:
Problem 1
- The requested package monolog/monolog dev-1.x#1.23.0 exists as monolog/monolog[1.0.0, 1.0.0-RC1, 1.0.1, 1.0.2, 1.1.0, 1.10.0, 1.11.0, 1.12.0, 1.13.0, 1.13.1, 1.14.0, 1.15.0, 1.16.0, 1.17.0, 1.17.1, 1.17.2, 1.18.0, 1.18.1, 1.18.2, 1.19.0, 1.2.0, 1.2.1, 1.20.0, 1.21.0, 1.22.0, 1.22.1, 1.23.0, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.9.1, 1.x-dev, dev-master, 2.x-dev] but these are rejected by your constraint.
I want to pull specific tag from specific branch. What do I do? this answer suggests I should be ok.
UPDATE:
After following Loek's advise and removing everything before the actual tag I get this:
The requested package monolog/monolog (installed at 1.21.0, required as 1.23.0) is satisfiable by monolog/monolog[1.21.0] but these conflict with your requirements or minimum-stability.
I already have "minimum-stability": "dev"
set up.
Upvotes: 3
Views: 6860
Reputation: 1711
I had a similar issue with phpmyadmin after some time keeping intact. version 4.5.0 which I realized was not existing, either deleted or wrongly inputted in past
What seems to help me was manually editing - removing the record from composer.json and issuing composer install command.
The next step was installing one of the concreted versions which was already mentioned like problematic - rejected by constrains 4.7.0 - php7.0 composer install phpmyadmin/phpmyadmin:4.7.0
I had also added along two settings - but those didn't seem to work alone
"minimum-stability": "dev",
"prefer-stable": true,
My original error message was
Problem 1
- The requested package phpmyadmin/phpmyadmin 4.5.0.* exists as phpmyadmin/phpmyadmin[4.0.0, 4.0.1, 4.0.10, 4.0.10.1, 4.0.10.2, 4.0.10.3, 4.0.10.4, 4.0.10.5, 4.0.10.6, 4.0.10.7, 4.0.10.8, 4.0.10.9, 4.0.2, 4.0.3, 4.0.4, 4.0.4.1, 4.0.4.2, 4.0.5, 4.0.6, 4.0.7, 4.0.8, 4.0.9, 4.7.0, 4.7.1, 4.7.2, 4.7.3, 4.7.4, 4.7.5, 4.7.6, 4.7.7, 4.7.8, 4.7.9, 4.7.x-dev, 4.8.0, 4.8.0.1, 4.8.1, 4.8.2, 4.8.3, 4.8.4, 4.8.5, 4.8.x-dev, 4.9.0, 4.9.0.1, 4.9.1, 4.9.x-dev, 5.0.x-dev, dev-master, 5.1.x-dev] but these are rejected by your constraint.
Upvotes: 0
Reputation: 31
I have had the same issue and the problem was on Packagist, I updated the release on Github and it was not updated on Packagist yet. So after updating it there the problem got fixed.
Upvotes: 1
Reputation: 97678
You can use the composer why-not
command to see what packages are conflicting with the version you've specified.
So, without any changes to your composer.json, run:
composer why-not monolog/monolog 1.23.0
This should tell you where the conflict is occurring.
There are also some things you can do to make such conflicts less likely:
composer update
without any arguments, to let Composer find the best set of packages that meets those constraints, rather than forcing it to change one package at a time.Upvotes: 6
Reputation: 4135
You can just specify the tag you want to download. If the package maintainers tagged their versions well, it doesn't matter on what branch or what stability it is. If you specify 1.23.0
, it will always pull in 1.23.0
.
EDIT
There is probably some package colliding. Check @IMSoP's answer for an easier way to resolve than mine.
Mine would be: update all the packages and Composer should show what packages are colliding.
Upvotes: 0