Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TraceableResponseForV4::getInfo must be compatible with ResponseInterface::getInfo #855

Closed
JakobBruening opened this issue Jun 22, 2024 · 3 comments · Fixed by #858
Closed
Assignees

Comments

@JakobBruening
Copy link

How do you use Sentry?

Sentry SaaS (sentry.io)

SDK version

5.0

Steps to reproduce

Executed composer update with symfony 6.4 (https://github.com/pimcore/pimcore/blob/11.x/composer.json)

Expected result

No error

Actual result

Fatal error: Declaration of Sentry\SentryBundle\Tracing\HttpClient\TraceableResponseForV4::getInfo(?string $type = null) must be compatible with Symfony\Contracts\HttpClient\ResponseInterface::getInfo(?string $type = null): mixed in /var  
  /www/html/vendor/sentry/sentry-symfony/src/Tracing/HttpClient/TraceableResponseForV4.php on line 15                                                                                                                                            
                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                 
PHP Fatal error:  Declaration of Sentry\SentryBundle\Tracing\HttpClient\TraceableResponseForV4::getInfo(?string $type = null) must be compatible with Symfony\Contracts\HttpClient\ResponseInterface::getInfo(?string $type = null): mixed in  
   /var/www/html/vendor/sentry/sentry-symfony/src/Tracing/HttpClient/TraceableResponseForV4.php on line 15                     
@JakobBruening JakobBruening changed the title Sentry\SentryBundle\Tracing\HttpClient\TraceableResponseForV4::getInfo(?string $type = null) must be compatible with Symfony\Contracts\HttpClient\ResponseInterface::getInfo(?string $type = null): mixed in /var/www/html/vendor/sentry/sentry-symfony/src/Tracing/HttpClient/TraceableResponseForV4.php TraceableResponseForV4::getInfo must be compatible with ResponseInterface::getInfo Jun 22, 2024
@Jean85
Copy link
Collaborator

Jean85 commented Jun 24, 2024

Something is loading TraceableResponseForV4, while you should be loading just TraceableResponseForV6. This is currently loaded here:

if (!class_exists(TraceableResponse::class) && interface_exists(HttpClientInterface::class)) {
if (!interface_exists(StreamableInterface::class)) {
class_alias(TraceableResponseForV4::class, TraceableResponse::class);

Do you have any strange situation where all those ifs are triggered and not the correct one?

@Shadow-Devil
Copy link

I had the same issue but fixed it via explicitly requiring symfony/http-client in my composer.json

@cleptric
Copy link
Member

cleptric commented Jul 1, 2024

Will be fixed by #858. Problem is that pimcore requires symfony/contracts but does not inlcude symfony/http-client, hence you're seeing this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants