Closed marcinincreo closed 1 year ago
Can you please share your composer.json
so we can try to reproduce?
@stayallive
hope this helps:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.2",
"ext-curl": "*",
"ext-json": "*",
"ext-zip": "*",
"bacon/bacon-qr-code": "^2.0",
"barryvdh/laravel-cors": "^0.11.3",
"barryvdh/laravel-dompdf": "^0.8.3",
"daltcore/lara-pdf-merger": "^2.0",
"doctrine/dbal": "^2.9",
"fideloper/proxy": "^4.0",
"firebase/php-jwt": "^5.0",
"guzzlehttp/guzzle": "^6.3",
"intervention/image": "^2.5",
"laravel-lang/lang": "~3.0",
"laravel/framework": "5.7.29",
"laravel/tinker": "^v1.0.10",
"maatwebsite/excel": "^3.1.22",
"nesbot/carbon": "1.33",
"sentry/sentry-laravel": "^2.4",
"silber/bouncer": "v1.0.0-rc.4",
"spatie/laravel-newsletter": "^4.2",
"symfony/psr-http-message-bridge": "1.3.0",
"tymon/jwt-auth": "1.0.*"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.6",
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
},
"files": [
"app/Helpers/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true,
"platform": {
"php": "7.2"
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
Hey sorry for the delay, just to confirm this lists symfony/psr-http-message-bridge: 1.3.0
but you said the issue was with v2 right?
I have tried "symfony/psr-http-message-bridge": "^2",
and composer update but cannot reproduce the error like that :( Have you ran a composer update
in your project too?
I tried that now with fresh Laravel 5.7 installation since I was thinking some other modules break it, but I got same error. Composer file to try it out:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0",
"sentry/sentry-laravel": "^2.5"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}
I tried that out also with Laravel 8 but everything works there as expected.
Some additional information:
We are facing the exact same issue with Laravel 5.7
I think I found the issue all, this was an oversight on my part.
Laravel 5.x uses another package to generate the PSR-7 request objects and that was what was throwing the error.
Can you all test it by changing this in your composer.json
(and running composer update
) and let me know if that indeed also solved the error for you?
- "sentry/sentry-laravel": "^2.4",
+ "sentry/sentry-laravel": "dev-master#96b3cf2ac4d71af39497e23098522d7e695aaf95"
I think I found the issue all, this was an oversight on my part.
Laravel 5.x uses another package to generate the PSR-7 request objects and that was what was throwing the error.
Can you all test it by changing this in your
composer.json
(and runningcomposer update
) and let me know if that indeed also solved the error for you?- "sentry/sentry-laravel": "^2.4", + "sentry/sentry-laravel": "dev-master#96b3cf2ac4d71af39497e23098522d7e695aaf95"
I use Lararvel 6.x and sentry 2.5.Same problem.The dev package version reslove this problem
Laravel 6.x uses nyholm/psr7
: https://laravel.com/docs/6.x/requests#psr7-requests
We require this PSR-7 package for you:
So you are either on a very old Laravel 6 (6.9 or below) or there is something else going on.
Can you confirm your Laravel version?
I will check it tmmr.cause code in corp lan network
发自我的iPhone
------------------ Original ------------------ From: Alex Bouma @.> Date: Mon,May 10,2021 6:54 PM To: getsentry/sentry-laravel @.> Cc: JiaYing Chen @.>, Comment @.> Subject: Re: [getsentry/sentry-laravel] Class 'Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory' not found (#473)
@stayallive solution worked for 5.7 and fixed the issue
2.5.3
was just released resolving this 👍
I'm facing this issue on the latest version 2.13.0
.
I'm using Laravel version 5.8.
It works without any error on the previous version 2.12.1
.
Running on Ubuntu 20.04 with PHP v7.3.33
I'm facing this issue on the latest version
2.13.0
. I'm using Laravel version 5.8. It works without any error on the previous version2.12.1
. Running on Ubuntu 20.04 with PHP v7.3.33
I can confirm this issue as well.
I have the same problem with Laravel 5.7
and Sentry 2.13.0
with PHP 7.4.30
.
I'll take a look!
Hi,
After updating sentry-laravel from 2.3.1 to 2.4 exception capture stops working. That's connected to using symfony/psr-http-message-bridge v2 (v1 does not throw error).