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

symfony/cache 6.2.0 breaks laziness redis connection while instantiating redis cache #48677

Closed
andrew-demb opened this issue Dec 16, 2022 · 0 comments

Comments

@andrew-demb
Copy link
Contributor

andrew-demb commented Dec 16, 2022

Symfony version(s) affected

6.2.0

Description

After updating to symfony/cache:6.2.0 our application tries to initialize a connection for Redis while clearing the cache (cache:clear).

How to reproduce

Use Redis cache adapter for app cache and add a dependency for app cache in any class constructor

Possible Solution

Do not inherit from \Redis in redis proxy classes or update check for a non-lazy connection according introduced inheritance in https://github.com/symfony/cache/blob/3be8d8412727e268a548319a1cc117232b7983f4/Adapter/RedisTagAwareAdapter.php#L68

Additional Context

This commit introduced proxy inheritance from \Redis: symfony/cache@31ce652

nicolas-grekas added a commit that referenced this issue Dec 16, 2022
…ter (nicolas-grekas)

This PR was merged into the 6.2 branch.

Discussion
----------

[Cache] fix lazyness of redis when using RedisTagAwareAdapter

| Q             | A
| ------------- | ---
| Branch?       | 6.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #48677
| License       | MIT
| Doc PR        | -

Commits
-------

9d510a7 [Cache] fix lazyness of redis when using RedisTagAwareAdapter
@xabbuh xabbuh added the Cache label Dec 17, 2022
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

4 participants