FriendsOfPHP / Goutte

Goutte, a simple PHP Web Scraper
MIT License
9.26k stars 1.01k forks source link

Can't install dependency error #399

Closed nomadme closed 4 years ago

nomadme commented 4 years ago

Composer is having trouble installing the package.

Seems like it is caused by the symfony/css-selector

./composer.json has been updated
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
    - Conclusion: don't install fabpot/goutte v4.0.0
    - Conclusion: remove symfony/css-selector v4.3.8
    - Installation request for fabpot/goutte ^4.0 -> satisfiable by fabpot/goutte[4.0.x-dev, v4.0.0].
    - Conclusion: don't install symfony/css-selector v4.3.8
    - fabpot/goutte 4.0.x-dev requires symfony/css-selector ^4.4|^5.0 -> satisfiable by symfony/css-selector[4.4.x-dev, 5.0.x-dev, 5.1.x-dev, v4.4.0, v4.4.0-BETA1, v4.4.0-BETA2, v4.4.0-RC1, v4.4.1, v5.0.0, v5.0.0-BETA1, v5.0.0-BETA2, v5.0.0-RC1, v5.0.1].
    - Can only install one of: symfony/css-selector[4.4.x-dev, v4.3.8].
    - Can only install one of: symfony/css-selector[v4.4.0, v4.3.8].
    - Can only install one of: symfony/css-selector[v4.4.0-BETA1, v4.3.8].
    - Can only install one of: symfony/css-selector[v4.4.0-BETA2, v4.3.8].
    - Can only install one of: symfony/css-selector[v4.4.0-RC1, v4.3.8].
    - Can only install one of: symfony/css-selector[v4.4.1, v4.3.8].
    - Can only install one of: symfony/css-selector[5.0.x-dev, v4.3.8].
    - Can only install one of: symfony/css-selector[5.1.x-dev, v4.3.8].
    - Can only install one of: symfony/css-selector[v5.0.0, v4.3.8].
    - Can only install one of: symfony/css-selector[v5.0.0-BETA1, v4.3.8].
    - Can only install one of: symfony/css-selector[v5.0.0-BETA2, v4.3.8].
    - Can only install one of: symfony/css-selector[v5.0.0-RC1, v4.3.8].
    - Can only install one of: symfony/css-selector[v5.0.1, v4.3.8].
    - Installation request for symfony/css-selector (locked at v4.3.8) -> satisfiable by symfony/css-selector[v4.3.8].
stof commented 4 years ago

Well, Goutte 4.0 requires symfony/css-selector 4.4+. And your project currently contains symfony/css-selector 4.3.8. So that's indeed not compatible. There is 2 possible fixes for that:

The solution to choose depends on your project.

nomadme commented 4 years ago

Thank you, I installed the 3.2.3 version.