sentry-laravel: Can't install Sentry - Composer error
Hi,
I can’t install the package through composer.
Here is the error:
Problem 1
- Installation request for sentry/sentry-laravel ^1.0 -> satisfiable by sentry/sentry-laravel[1.0.0, 1.0.0-beta1, 1.0.0-beta2, 1.0.0-beta3, 1.0.0-beta4, 1.0.0-beta5, 1.0.1, 1.0.x-dev].
- Can only install one of: php-http/httplug[v2.0.0, v1.1.0].
- Can only install one of: php-http/httplug[v1.1.0, v2.0.0].
- Can only install one of: php-http/httplug[v1.1.0, v2.0.0].
- Conclusion: install php-http/httplug v1.1.0
- Installation request for php-http/httplug (locked at v2.0.0) -> satisfiable by php-http/httplug[v2.0.0].
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 32 (6 by maintainers)
So it looks like there is some sort of incompatibility that composer for some reason is not complaining about (that we believe should be happening).
The problem is that you guys are using
laravel/passportthat requireszendframework/zend-diactoros:^1.0but also requiring thephp-http/curl-client:^2.0(directly or indirectly) which requireszendframework/zend-diactoros:^2.0(or another package that implements the PSR-17 response factory).There are 2 solutions.
laravel/passportto^7.2.2which allows for the correctzendframework/zend-diactoros:^2.0to be installedphp-http/curl-client:^1.0We are seeing if there is something we can do from our side or we might be doing it wrong or there is a problem in the dependencies of httplug, but the above solutions should get you moving with using
sentry/sentry-laravel:^1.0.@stayallive thanks for looking into this, it’s really appreciated when product teams look out for their community, getting more rare these days with early dismissal of “not our problem”.
Tomorrow I’ll try upgrading passport - this seems to make the most logical and progressive sense and shall report back 😃
Update
Updating passport did solve it 😃 running laravel/passport 7.2.2
Although upgrading passport caused a strange mixture of errors and api endpoints not being authenticated properly so spend whole bunch of time fixing that 😦
@stayallive We’re also experiencing this - have tried a
rm -rf vendorwith a full composer update/install combo.This is all our packages
These are the sentry packages that have got installed
Getting the same
No PSR-17 response factory founderrorI believe that the reason (if he did what @Jean85 suggested) is that by telling Composer to not install
sentry/sdk(the metapackage) then obviously each dependency of the core package must be required manually, which means a HTTP transport compatible with HTTPlug and a PSR-7 packageYeah, Fixed my issue with a note on the docs at the very last section. @stayallive Good job on the doc update
@stayallive This happening when I update composer. Any thoughts?
I suggested https://github.com/getsentry/sentry-php-sdk/pull/2 as a solution, so you can try to apply it indipendently requiring
http-interop/http-factory-guzzle. In general, requiring any of the feasible package would fix the issue, sincesentry/sdkis only used to require the suggested transport, but you’re not forced to use those.@adamcopley try running
composer updatefirst, we recently updated our dependencies to allow for the 2.0 of the httplug CURL client and I just tried your dependencies and they install correctly without issues.@Otienoh I have no idea what you have in your composer.json, if you could post that it would help figuring it out. But just the following is enough to get a working setup (default Laravel packages +
sentry/sentry-laravel).