-
Notifications
You must be signed in to change notification settings - Fork 185
Closed
Description
Environment
PHP: 7.4.33
sentry/sdk: (omitted)
sentry/sentry: 3.17.0
sentry/sentry-symfony: 4.7.0
symfony/*: 5.4.21
Steps to Reproduce
Note: Installation done through composer
- install Symfony LTS (5.4)
- install symfony/http-client and nyholm/psr7
- disable sentry/sdk in
composer.json
- install sentry/sentry-symfony
- use default configuration (tracing enabled)
- trigger the error by running code that makes an HTTP request
Expected Result
The HTTP request should be processed without error.
Actual Result
The requests throws a class-not-found error.
NOTICE: PHP message: php.CRITICAL: Uncaught Error: Class 'GuzzleHttp\Psr7\Uri' not found {"exception":"[object] (Error(code: 0): Class 'GuzzleHttp\\Psr7\\Uri' not found at /app/vendor/sentry/sentry-symfony/src/Tracing/HttpClient/AbstractTraceableHttpClient.php:54)"} []
The reason for this error is that GuzzleHttp\Psr7\Uri
is used in AbstractTraceableHttpClient::request()
without declaring it a dependency in either sentry/sentry-symfony or sentry/sentry. However, guzzlehttp/psr7 is a dependency of sentry/sdk.
A possible fix were to have a dependency on Psr\Http\Message\UriFactoryInterface
in AbstractTraceableHttpClient
since that is already required by sentry/sentry.
Metadata
Metadata
Assignees
Labels
No labels