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

Closed
loevgaard opened this issue Apr 30, 2024 · 3 comments
Assignees

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

@cleptric
Copy link
Member

cleptric commented May 2, 2024

We'll take a look.

@cleptric
Copy link
Member

cleptric commented Jul 1, 2024

Fixed in #841.

@cleptric cleptric closed this as completed Jul 1, 2024
@loevgaard
Copy link
Author

Thank you 🎉

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

No branches or pull requests

3 participants