You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After further investigation I noticed that my fresh project was installing v5.0.64 of clicksend-php but my laravel project was installing v5.0.1.
I tried to manually force my laravel project to install v5.0.64, but I received a guzzle clash:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Can only install one of: guzzlehttp/guzzle[7.1.0, 6.5.x-dev].
- Can only install one of: guzzlehttp/guzzle[7.1.1, 6.5.x-dev].
- Can only install one of: guzzlehttp/guzzle[7.1.x-dev, 6.5.x-dev].
- Can only install one of: guzzlehttp/guzzle[6.5.x-dev, 7.1.1].
- clicksend/clicksend-php v5.0.64 requires guzzlehttp/guzzle ^6.2 -> satisfiable by guzzlehttp/guzzle[6.5.x-dev].
- Installation request for clicksend/clicksend-php 5.0.64 -> satisfiable by clicksend/clicksend-php[v5.0.64].
- Installation request for guzzlehttp/guzzle ^7.1 -> satisfiable by guzzlehttp/guzzle[7.1.0, 7.1.1, 7.1.x-dev].
for me (not using Laravel, so I don't have the same deps as you), the fix was:
# get rid of currently installed 7.x guzzle
composer remove guzzlehttp/guzzle
# require compatible versions of clicksend and guzzle
composer require clicksend/clicksend-php:^5.0 guzzlehttp/guzzle:^6.2
While the version bump might fix your composer issue, you may or may not find that ClickSend is fully compatible with v7 of Guzzle. The requirement really only wants to be changed if it's required. If ClickSend is compatible with multiple releases of Guzzle then Composer supports multiple versions eg ~6.0 || ~7.0 which would avoid requiring all other projects using the same library to upgrade their Guzzle lib.
Activity
ArcazSuarez commentedon Aug 22, 2020
I got the same problem. Does anyone know any solution?
jacksegal commentedon Oct 2, 2020
I had the same issue, but managed to get it working by installing the ClickSend SDK in a fresh project (rather than adding it to a Laravel one).
So there seems to be some sort of clash with the autoload / namespacing?
jacksegal commentedon Oct 2, 2020
After further investigation I noticed that my fresh project was installing v5.0.64 of
clicksend-phpbut my laravel project was installing v5.0.1.I tried to manually force my laravel project to install v5.0.64, but I received a guzzle clash:
jacksegal commentedon Oct 2, 2020
I can get it working on laravel by removing the following
requirefrom mycomposer.json:It then successfully makes the API call to ClickSend - although not sure which parts of Laravel need guzzle v7
jacksegal commentedon Oct 2, 2020
Okay, think I've found the best solution:
composer.json(to match Laravel)clicksend-phplib:composer remove clicksend/clicksend-phpcomposer require jacksegal/clicksend-php "dev-master"Waseem-Alhabash commentedon Oct 3, 2020
@jacksegal Thank You , works like a charm !!
xurizaemon commentedon Oct 9, 2020
@jacksegal rather than suggesting people use your fork, you can PR your change to the upstream repo
https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request
for me (not using Laravel, so I don't have the same deps as you), the fix was:
While the version bump might fix your composer issue, you may or may not find that ClickSend is fully compatible with v7 of Guzzle. The requirement really only wants to be changed if it's required. If ClickSend is compatible with multiple releases of Guzzle then Composer supports multiple versions eg
~6.0 || ~7.0which would avoid requiring all other projects using the same library to upgrade their Guzzle lib.jacksegal commentedon Oct 9, 2020
Thanks @xurizaemon - there is actually already an issue open for them to update their dependencies: #23.
I was just letting people know there was a manual workaround to their problem 👍
xurizaemon commentedon Oct 9, 2020
I get that, but it's no small task taking on maintenance of a fork; you really should consider
Best of luck! 😁