reactphp / socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP.
https://reactphp.org/socket/
MIT License
1.21k stars 157 forks source link

cannot install v1.4.0 with composer #237

Closed markkimsal closed 4 years ago

markkimsal commented 4 years ago

There seems to be a dependency loop with v1.4.0

composer require react/socket:^1.4

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - react/react v0.4.2 requires react/socket 0.4.* -> satisfiable by react/socket[0.4.x-dev].
    - react/react v0.4.2 requires react/socket 0.4.* -> satisfiable by react/socket[0.4.x-dev].
    - Can only install one of: react/socket[v1.4.0, 0.4.x-dev].
    - Installation request for react/socket ^1.4 -> satisfiable by react/socket[v1.4.0].
    - Installation request for react/react (installed at v0.4.2) -> satisfiable by react/react[v0.4.2].

I think this is because socket requires react/dns 0.4 and react/http 0.4 and somehow, those packages require the meta package react/react 0.4.

composer.json

{
    "minimum-stability": "dev",
    "require": { 
        "evenement/evenement": "~2.0"
    },
    "require-dev": { 
        "phpunit/phpunit": "^9.2"
    } 
}

no composer.lock file

markkimsal commented 4 years ago

Never mind, it works on a clean directory. I have no idea what's going on with my project with such a small composer file and no composer.lock.

WyriHaximus commented 4 years ago

@markkimsal those are some rather old versions at this point. Would suggest updating to our latest versions as they include tons of improvements and bug fixes.

markkimsal commented 4 years ago

@WyriHaximus the whole point is that I was asking to install react/socket @ 1.4.0 and composer was pulling in old versions for no reason.

if I typed in react/socket ^1.4.0 into the composer json and ran composer install it worked, but composer require react/socket:^1.4.0 was pulling in old 0.4 stuff. Very strange.

WyriHaximus commented 4 years ago

@markkimsal probably something in there that project/package still requiring the older version. A bunch of our packages are BC with older version, so if that matches up with something in there it's not that strange it will try to pull those packages in.