swow / swow

Coroutine-based cross-platform concurrent I/O engine.
Apache License 2.0
1.2k stars 113 forks source link

[bug] Default installation of Swow through composer fails #218

Open akiirax opened 1 year ago

akiirax commented 1 year ago

php82 ~/bin/composer require swow/swow

No composer.json in current directory, do you want to use the one at ~/trying-out-swow/? [Y,n]? Y

Always want to use the parent dir? Use "composer config --global use-parent-dir true" to change the default.
Using version ^1.3 for swow/swow
./composer.json has been updated
Running composer update swow/swow
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires swow/swow ^1.3 -> satisfiable by swow/swow[v1.3.0, v1.3.1].
    - swow/swow[v1.3.0, ..., v1.3.1] require psr/http-message ^1.1 -> found psr/http-message[1.1] but the package is fixed to 1.0.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require swow/swow:*" to figure out if any version is installable, or "composer require swow/swow:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
xywf221 commented 1 year ago

Problem 1

  • Root composer.json requires swow/swow ^1.3 -> satisfiable by swow/swow[v1.3.0, v1.3.1].
  • swow/swow[v1.3.0, ..., v1.3.1] require psr/http-message ^1.1 -> found psr/http-message[1.1] but the package is fixed to 1.0.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

From this display, it can be seen that your computer does not have a composer. json, but it does have a composer. lock

akiirax commented 1 year ago

No that was an empty directory completely.

I'll retry in a completely different environment and re-verify.

xywf221 commented 1 year ago

This is the result of my experiment in an empty directory

image
xuanyanwow commented 1 year ago
swow/swow[v1.3.0, ..., v1.3.1] require psr/http-message ^1.1
but the package is fixed to 1.0.1 (lock file version) 

try to update psr/http-message first?

composer update psr/http-message
composer require swow/swow