geocoder-php / Geocoder

The most featured Geocoder library written in PHP.
https://geocoder-php.org
MIT License
3.95k stars 517 forks source link

Installation error #916

Closed dorianrod closed 5 years ago

dorianrod commented 5 years ago

Hi,

When executing this command as mentioned in documentation : "composer require geocoder-php/google-maps-provider php-http/guzzle6-adapter php-http/message", I have the following message:

G:\App\wamp64\www\myscenery\wp-content\plugins> composer require geocoder-php/google-maps-provider php-http/guzzle6-adapter php-http/message
Using version ^4.3 for geocoder-php/google-maps-provider
Using version ^2.0 for php-http/guzzle6-adapter
Using version ^1.7 for php-http/message
./composer.json has been created
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
    - Installation request for geocoder-php/google-maps-provider ^4.3 -> satisfiable by geocoder-php/google-maps-provider[4.3.0].
    - geocoder-php/google-maps-provider 4.3.0 requires geocoder-php/common-http ^4.0 -> satisfiable by geocoder-php/common-http[4.0.0, 4.1.0].
    - geocoder-php/common-http 4.0.0 requires php-http/httplug ^1.0 -> satisfiable by php-http/httplug[v1.0.0, v1.1.0].
    - geocoder-php/common-http 4.1.0 requires php-http/httplug ^1.0 -> satisfiable by php-http/httplug[v1.0.0, v1.1.0].
    - Can only install one of: php-http/httplug[v2.0.0, v1.0.0].
    - Can only install one of: php-http/httplug[v2.0.0, v1.1.0].
    - php-http/guzzle6-adapter v2.0.0 requires php-http/httplug ^2.0 -> satisfiable by php-http/httplug[v2.0.0].
    - Installation request for php-http/guzzle6-adapter ^2.0 -> satisfiable by php-http/guzzle6-adapter[v2.0.0].

Installation failed, deleting ./composer.json

I'm recently using composer, so I have no clue for this issue. Does anyone encounters the same problem and know how to resolve it?

Dorian

jbelien commented 5 years ago

Hello @dorianrod , I believe it's related to #902

We already fixed it but we didn't release it yet. You can fix this by forcing the use of php-http/guzzle6-adapter: ^1.0 (or apply the fix, see here).

jbelien commented 5 years ago

@Nyholm @willdurand Wouldn't be worth release a new version of geocoder-php/geocoder ? 😃

Nyholm commented 5 years ago

Actually, geocoder-php/geocoder is not a package.

https://packagist.org/search/?q=geocoder-php%2Fgeocoder&reason=package_not_found

jbelien commented 5 years ago

Oh sorry, I meant geocoder-php/common-http of course :) Thanks for releasing 4.2.0 👍

Nyholm commented 5 years ago

Yes. geocoder-php/common-http should have had a release a few months ago. I've must forgotten =)

jbelien commented 5 years ago

@dorianrod Your issue should be fixed now with the new release of geocoder-php/common-http.

Can you confirm ?