composer: Composer hangs in "Something's changed, looking at all rules again" state
My composer.json
:
{
"name": "prooph/event-store-client",
"type": "library",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Sascha-Oliver Prolic",
"email": "saschaprolic@googlemail.com"
}
],
"keywords": [
"EventStore",
"EventSourcing",
"DDD",
"prooph",
"Amp",
"Async"
],
"prefer-stable": true,
"require": {
"php": "^7.2",
"ext-json": "*",
"amphp/amp": "^2.0.7",
"amphp/artax": "^3.0.14",
"amphp/byte-stream": "^1.3.1",
"amphp/cache": "^1.2.0",
"amphp/dns": "^0.9.13",
"amphp/file": "^0.3.1",
"amphp/log": "^1.0.0",
"amphp/parallel": "^0.2.5",
"amphp/process": "^0.3.3",
"amphp/socket": "^0.10.9",
"amphp/uri": "^0.1.3",
"ramsey/uuid": "^3.7.3"
},
"require-dev": {
"malukenho/docheader": "^0.1.4",
"phpspec/prophecy": "^1.7",
"phpunit/phpunit": "^7.3.3",
"prooph/php-cs-fixer-config": "^0.2.1",
"satooshi/php-coveralls": "^1.0"
},
"autoload": {
"psr-4": {
"Prooph\\EventStoreClient\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ProophTest\\EventStoreClient\\": "tests/"
}
},
"scripts": {
"check": [
"@cs",
"@test"
],
"cs": "php-cs-fixer fix -v --diff --dry-run",
"cs-fix": "php-cs-fixer fix -v --diff",
"test": "phpunit"
},
"config": {
"sort-packages": true
}
}
Output of composer diagnose
:
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: af677553cce0967bf7c364d64a9a169152c33fcd
PHP version: 7.1.22
PHP binary path: /home/kelunik/.phpenv/versions/7.1.22/bin/php
When I run this command:
composer install -vvv
I get the following output:
...
Reading /home/kelunik/.cache/composer/repo/https---repo.packagist.org/provider-guzzle$guzzle.json from cache
Reading /home/kelunik/.cache/composer/repo/https---repo.packagist.org/provider-symfony$config.json from cache
Reading /home/kelunik/.cache/composer/repo/https---repo.packagist.org/provider-symfony$yaml.json from cache
Resolving dependencies through SAT
Looking at all rules.
Something's changed, looking at all rules again (pass #135)
And I expected this to happen:
Composer shouldn’t hang in the Something's changed, looking at all rules again
state and count the pass
up forever.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 17
- Comments: 68 (19 by maintainers)
Commits related to this issue
- Docker: Make OctoberCMS version configurable, default to 458 The version can be overridden locally with the `OCTOBER_VERSION` environment variable pointing to a valid git tree-ish, e.g.: ``` export O... — committed to akien-mga/godot-website by akien-mga 4 years ago
- Add a test to reproduce github issue #7665 — committed to naderman/composer by naderman 4 years ago
- Add a test to reproduce github issue #7665 — committed to naderman/composer by naderman 4 years ago
- Add a test to reproduce github issue #7665 — committed to naderman/composer by naderman 4 years ago
- Add a test to reproduce github issue #7665 — committed to naderman/composer by naderman 4 years ago
“require-dev”: { “fzaninotto/faker”: “~1.4”, “mockery/mockery”: “0.9.*”, “phpunit/phpunit”: “~6.0”, “phpspec/phpspec”: “~2.1”, “doctrine/dbal”: “^2.5”, “filp/whoops”: “~2.0”
After removing the phpspec/phpspec composer update works fine.
I was able to reproduce it with this minimal composer.json
Well, I guess have to decide between tested code and clean code then…
I have the exact same scenario as @windhamdavid , with the same package: https://github.com/nunomaduro/collision
I’m trying to upgrade from Laravel 6.x to 7.x and this issue is making it impossible to do so.
What was the exact Composer command you ran when you identified the conflicting package? The one you show,
composer update --prefer-dist -vvv --profile
, doesn’t explain how you identified the conflict.Also, you don’t show which packages you added or removed, if any, before running
composer update
with a successful result.In my case, I ran
composer update ...
, took the first package that failed due to being locked at a different version, and appended it to the command, ad nauseam, until I got the dreaded(What has changed, exactly? The weather? This message could probably be improved…)
The only reason I knew it was
nunomaduro/collision
is because that’s the last package I appended to the command before I got the above message.@windhamdavid Ultimately, it would be extremely helpful if you could answer the following:
composer update ...
with the result that you show in https://github.com/composer/composer/issues/7665#issuecomment-590474507 ?composer update ...
with a successful result, i.e., how did you actually fix the problem?@ahsanmster Yes, I managed to work around the problem by identifying the offending package and fixing the conflict. My apologies for not posting an update before now.
In my case, the problematic package was not
nunomaduro/collision
per se, but rather, another third-party package whose version ofsymfony/console
conflicted with it, exactly as @windhamdavid describes in https://github.com/composer/composer/issues/7665#issuecomment-590474507 :The specific method that I used to identify the problematic package was as I described in the comment you quoted (although, I could have been clearer and provided an example). Essentially, the process is as follows:
composer update laravel/framework
(or whichever package you’re trying to update), and it should fail due to a package being locked at a different version. (Let us know if you get theSomething's changed
message already, at this point!)acme/foo
package, the next command to run would becomposer update laravel/framework acme/foo
.acme/bar
package, then runcomposer update laravel/framework acme/foo acme/bar
and repeat the process until you get the dreadedSomething's changed
message. Don’t forget that you can use wildcards in package names, too, e.g.,symfony/*
, which can save you a lot of time if you’re dealing with many packages from the same vendor. The last package you add to the command prior to gettingSomething's changed
should provide a clue as to the offending package that requires the conflicting version ofsymfony/console
(or whatever it happens to be).composer.json
so that the offending package, such assymfony/console
, doesn’t conflict withnunomaduro/collision
, for example. If the package is not your own, then I suppose you have no choice but to fork it and fix it in your fork (until it’s fixed upstream), or perhaps add something clever in your project’s top-levelcomposer.json
to alias the package version or similar to solve the conflict.Hope that helps!
In one of these cases, I let it run on a server inside screen for a while:
That’s a long time: Pass #<span></span>193 needed about 95 hours or four days to complete! I guess some composer internals might be not properly optimized…
PHP 7.1 + Ubuntu 16.04 (Core i7) + composer 1.7.2
My workaround for this was to remove the entire
require-dev
block (x7 deps) and then re-runcomposer update
. This ran sucessfully. Once complete, I then added each dev-dep back-intocomposer.json
one-by-one, runningcomposer update
each time. I repeated this twice to be sure.Note: I still got the “Something’s changed” message each time, but it only ran for ~5+ passes (As opposed to hundreds), and took 2-3s.
Hope that helps someone.
Maybe the issue happens with PHP 7.2 and not with PHP 7.1? https://travis-ci.com/freshbitsweb/laratables/builds/89503447
I had this problem as well. I forced composer to stop after pass 1k+.
It turns out that it’s caused by this combination of require-dev dependencies:
Removing phpdocumentor resolved the issue in my case.
I also had a similar problem today trying to update my application to Laravel 5.6 and then 5.7. In my case I had to remove
phpspec/phpspec
and another library that was requesting Symfony components from version3.2
by using the following condition3.2.*
. Not sure why, but in other cases it was just raising errors immediately, and I would had expected the same scenario for this library, but it didn’t happenI had the same issue too. I removed phpunit and phing from my composer file. I’m not sure which one was the causing the problem, or both. But it works now.
I have been trying to install https://github.com/orchestral/testbench
I temporarily removed
"illuminate/support": "5.5.*|5.6.*|5.7.*"
from require section and it worked. Not sure what’s happening.Going to close this as #9312 is merged and this contains so many repro cases that it’s turned into quite a mess. If anyone still experiences the problem with the latest snapshot (
composer self-update --snapshot
) please open a new issue.@tolidano Not sure how your issue is related to the bug here. But you seem to simply be looking for the “–update-with-dependencies” option on composer require. Since you have all kinds of deps locked to versions not compatible with what you’re trying to require.
@naderman the above
composer.json
sample indeed seems incredibly problematic. Would you be able to dive into the solver and see what the underlying cause for this is?Currently getting this issue, removing
"phpunit/phpunit": "4.1.0",
fixed this for me.I’m not sure. It would make sense if it didn’t work because of something being wrong with the package, but from what I can tell, that’s not the case at all. To start with, I would think that one of the developers should be able to explain under what circumstances this message is generated.
had the issue with php 7.1, removing
phpspec/phpspec
fromrequire-dev
helped me as well