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

Attempted to call an undefined method named "setCallbackWrapper" of class "Symfony\Component\Cache\Adapter\TraceableAdapter" #840

Open
loevgaard opened this issue Apr 30, 2024 · 1 comment

Comments

@loevgaard
Copy link

loevgaard commented Apr 30, 2024

How do you use Sentry?

Sentry SaaS (sentry.io)

SDK version

SDK: 3.22, bundle: 4.14

Steps to reproduce

I added this configuration:

framework:
    cache:
        pools:
            async.cache:
                early_expiration_message_bus: messenger.default_bus

from this page: https://symfony.com/doc/current/cache.html#computing-cache-values-asynchronously

and got this exception:

[Symfony\Component\ErrorHandler\Error\UndefinedMethodError]
Attempted to call an undefined method named "setCallbackWrapper" of class "Symfony\Component\Cache\Adapter\TraceableAdapter".

The method setCallbackWrapper it's trying to call is defined in the \Symfony\Component\Cache\Traits\ContractsTrait and it might be therefore it's assumed that it's also present on the TraceableAdapter. Because Sentry decorates the TraceableAdapter with the Sentry\SentryBundle\Tracing\Cache\TraceableCacheAdapter this will cause an exception.

A possible solution could be to just add the method setCallbackWrapper to your \Sentry\SentryBundle\Tracing\Cache\TraceableCacheAdapterTrait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants