geocoder-php / Geocoder

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

Not possible to install TomTom provider with cURL client #1021

Closed squizee closed 4 years ago

squizee commented 4 years ago

Sorry if I mess something, but like I read on Geocoder docs:

1) What Geocoder provider you want to use 2) What HTTP client/adapter you want to use.

So, I pick one and one from here :)

# composer require php-http/curl-client geocoder-php/tomtom-provider
Using version ^2.0 for php-http/curl-client
Using version ^4.0 for geocoder-php/tomtom-provider
./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
    - geocoder-php/common-http 4.2.0 requires psr/http-message-implementation ^1.0 -> no matching package found.
    - geocoder-php/common-http 4.1.0 requires psr/http-message-implementation ^1.0 -> no matching package found.
    - geocoder-php/common-http 4.0.0 requires psr/http-message-implementation ^1.0 -> no matching package found.
    - geocoder-php/tomtom-provider 4.0.0 requires geocoder-php/common-http ^4.0 -> satisfiable by geocoder-php/common-http[4.0.0, 4.1.0, 4.2.0].
    - Installation request for geocoder-php/tomtom-provider ^4.0 -> satisfiable by geocoder-php/tomtom-provider[4.0.0].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.
atymic commented 4 years ago

You've got the adapter, but you missed installing the php-http/message package, which provides the factories & associated classes around PSR7

squizee commented 4 years ago

I tried this before. Exactly the same :(


# composer require php-http/curl-client php-http/message geocoder-php/tomtom-provider
Using version ^2.0 for php-http/curl-client
Using version ^1.8 for php-http/message
Using version ^4.0 for geocoder-php/tomtom-provider
./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
    - geocoder-php/common-http 4.2.0 requires psr/http-message-implementation ^1.0 -> no matching package found.
    - geocoder-php/common-http 4.1.0 requires psr/http-message-implementation ^1.0 -> no matching package found.
    - geocoder-php/common-http 4.0.0 requires psr/http-message-implementation ^1.0 -> no matching package found.
    - geocoder-php/tomtom-provider 4.0.0 requires geocoder-php/common-http ^4.0 -> satisfiable by geocoder-php/common-http[4.0.0, 4.1.0, 4.2.0].
    - Installation request for geocoder-php/tomtom-provider ^4.0 -> satisfiable by geocoder-php/tomtom-provider[4.0.0].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.
atymic commented 4 years ago

huh, good point, seems like the docs are not very clear. php-http/message isn't actually a psr/http-message-implementation package.

I tested this and it works:

composer require php-http/curl-client geocoder-php/tomtom-provider nyholm/psr7
squizee commented 4 years ago

Yup :) That's correct. Tried this also but nonidea what's nyholm/psr7 :-o

Thank you :)

Regards

sob., 12 paź 2019, 13:45 użytkownik atymic notifications@github.com napisał:

huh, good point, seems like the docs are wrong. php-http/message isn't actually a psr/http-message-implementation package.

I tested this and it works:

composer require php-http/curl-client geocoder-php/tomtom-provider nyholm/psr7

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/geocoder-php/Geocoder/issues/1021?email_source=notifications&email_token=ADJMLLOJFFX5ZRWDQ6UBODTQOG2HNA5CNFSM4I74X5H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBB5QVQ#issuecomment-541317206, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJMLLNKYY26UWXOJEIZPITQOG2HNANCNFSM4I74X5HQ .

atymic commented 4 years ago

nyholm/psr7 is just an implementation of the PSR7 message spec :)

I've created a PR to make the docs a bit more clear.