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". #54783

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

Comments

@loevgaard
Copy link
Contributor

Symfony version(s) affected

6.4.*

Description

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.

How to reproduce

I think by just adding the above configuration it will trigger the exception. I have not tried this on a fresh Symfony install.

Possible Solution

No response

Additional Context

No response

@loevgaard
Copy link
Contributor Author

I figured out it was Sentrys decoration of the TraceableAdapter that caused the eror (which I have posted an issue about here: getsentry/sentry-symfony#840), however, I feel it's still a small bug in Symfony because the setCallbackWrapper is only defined in the ContractsTrait.

@xabbuh xabbuh added the Cache label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants