sentry-laravel: Call to undefined method Sentry\Tracing\Transaction::setHttpStatus()' in src/Sentry/Laravel/Tracing/Middleware.php:66

Hi,

After updating to 2.0.1, we get those errors : Call to undefined method Sentry\Tracing\Transaction::setHttpStatus()' in src/Sentry/Laravel/Tracing/Middleware.php:66

Looks like the Transaction::setHttpStatus() is quite new and has been introduce in the SDK on version 3.0.2 with this PR: https://github.com/getsentry/sentry-php/pull/1092

The thing is, the composer.json file in the 2.0.1 release mention this requirement: "sentry/sdk": "^3.0".

You probably should force the version of “sentry/sdk” to at least 3.0.2 in order not to break your tracing middleware.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 28

Most upvoted comments

Everything looks good now. Thanks again!

Hi, Removing "minimum-stability": "dev" causes other issues for me.

What fixed it for me is deleting the lock file & vendor directory and adding "sentry/sentry": "^3.0.3", to composer.json