getsentry / sentry-laravel

The official Laravel SDK for Sentry (sentry.io)
https://sentry.io
MIT License
1.24k stars 188 forks source link

Unable to install sentry-laravel using documentation steps #191

Closed brianhogg closed 5 years ago

brianhogg commented 5 years ago

Tried adding sentry-laravel using the instructions in the documentation https://docs.sentry.io/platforms/php/laravel/#laravel-5x:

composer require sentry/sentry-laravel:1.0.0-beta5 php-http/curl-client guzzlehttp/psr7

Error comes back as:

Using version ^1.7 for php-http/curl-client
Using version ^1.5 for guzzlehttp/psr7
./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
    - Installation request for sentry/sentry-laravel 1.0.0-beta5 -> satisfiable by sentry/sentry-laravel[1.0.0-beta5].
    - sentry/sentry-laravel 1.0.0-beta5 requires sentry/sentry 2.0.0-beta2 -> satisfiable by sentry/sentry[2.0.0-beta2] but these conflict with your requirements or minimum-stability.

Installation failed, reverting ./composer.json to its original content

Seems the version is incorrect in the documentation? Doing this command works without error:

composer require sentry/sentry-laravel php-http/curl-client guzzlehttp/psr7

but installs version ^0.11.0 and not sure if that'll cause issues with the logging or what features would be missing.

stayallive commented 5 years ago

@brianhogg Hey Brian, 0.11.x is currently the stable version and can be installed without the php-http/curl-client guzzlehttp/psr7 dependencies.

You probably have the minimum stability in your composer.json set to stable which means any dependency (sentry/sentry) of your dependencies (sentry/sentry-laravel) must all be stable, sentry/sentry:2.0.0-beta2 is not currently (it's in beta).

If you want to use the 1.x version of the Laravel integration you can run:

composer require "sentry/sentry:2.0.0-beta2@dev" "sentry/sentry-laravel:1.0.0-beta5@dev" php-http/curl-client guzzlehttp/psr7

The above will require sentry/sentry directly and allow it using the @dev marker.

stayallive commented 5 years ago

The 1.0.0 version of the Laravel integration is now released.

Installation instructions are here: docs.sentry.io/platforms/php/laravel

And they should no longer require any stability changes :)

Please re-open / open a new issue if you keep having troubles!

winstonfale commented 5 years ago

from docs composer require sentry/sentry-laravel:1.0.0

Problem 1

i still got same issue. laravel 5.4

"require": { "php": ">=7.0.0", "alek13/slack": "^1.10", "bacon/bacon-qr-code": "1.0.3", "barryvdh/laravel-cors": "^0.11.0", "doctrine/dbal": "^2.7", "fideloper/proxy": "~3.3", "google/apiclient": "^2.0", "guzzlehttp/guzzle": "^6.3", "intervention/image": "^2.4", "io-developer/php-whois": "^3.0", "irazasyed/telegram-bot-sdk": "^2.0", "jsmitty12/phpwhois": "^5.0", "kitetail/zttp": "^0.3.0", "laracasts/flash": "^3.0", "laravel/cashier": "~7.0", "laravel/framework": "5.5.*", "laravel/socialite": "^3.0", "laravel/tinker": "~1.0", "layershifter/tld-extract": "^1.2", "pda/pheanstalk": "~3.0", "pragmarx/google2fa": "^3.0", "rap2hpoutre/laravel-log-viewer": "^0.15.0", "sentry/sentry": "^1.7", "sentry/sentry-laravel": "^0.8.0", "spatie/browsershot": "^3.26", "spatie/laravel-stripe-webhooks": "^1.1", "spatie/ssl-certificate": "^1.12", "vajiral/php-image-compare": "^1.0" },

is there any incompatible on other plugins?

im using php 7.1

however composer require "sentry/sentry:2.0.0-beta2@dev" "sentry/sentry-laravel:1.0.0-beta5@dev" php-http/curl-client guzzlehttp/psr7

Edit: i run these and make me go through.

stayallive commented 5 years ago

@tonz341, remove sentry/sentry:^1.7 from your requirements.

The Laravel integration 1.0 uses sentry/sentry 2.0 and ^1.7 does not permit installing it.

Only require sentry/sentry-laravel:^1.0, no other Sentry packages required.

tiwarinitin94 commented 4 years ago

I just removed the older version from composer.json and added new one, but beware it can affect you Dev code