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

Issues with latest phpredis breaking RedisTaggedCache #53087

Closed
scottasmith opened this issue Oct 9, 2024 · 1 comment · Fixed by #53095
Closed

Issues with latest phpredis breaking RedisTaggedCache #53087

scottasmith opened this issue Oct 9, 2024 · 1 comment · Fixed by #53095

Comments

@scottasmith
Copy link

scottasmith commented Oct 9, 2024

Laravel Version

11.9

PHP Version

Docker/Linux php:8.3.7-fpm-bookworm

Database Driver & Version

N/A

Description

OS: Docker / Linux
PHP: 8.3.7
Laravel: 11.9
Redis server: 7.4
phpredis: 6.1.0

The latest version of phpredis (6.1.0) has been changed to use an unsigned 64-bit cursor.
See phpredis/phpredis#2458 and phpredis/phpredis#2462.

There is a bug report here phpredis/phpredis#2562, but this is intended behaviour going forward.

This means it breaks tagged caching on redis.

This is the line causing the issue with the latest version of the extension: https://github.com/laravel/framework/blob/master/src/Illuminate/Cache/RedisStore.php#L298

Also this is breaking the entries https://github.com/laravel/framework/blob/master/src/Illuminate/Cache/RedisTagSet.php#L40

Steps To Reproduce

To recreate I did composer create-project laravel/laravel:^11 . in a new directory. Then I added a docker-compose.yml and Dockerfile to it along with some examples in routes/web.php.

The problem is shown in this repo: https://github.com/scottasmith/laravel-phpredis-problems

If you clone it, run docker compose up -d and navigate to the urls in https://github.com/scottasmith/laravel-phpredis-problems/blob/main/routes/web.php.

  • http://localhost:8001/not-working shows phpredis and how laravel currently works
  • http://localhost:8001/working shows phpredis and how laravel should work (with this version)
  • http://localhost:8001/laravel-failing demonstrates that the flush isn't working
  • http://localhost:8001/laravel-entries shows its not getting the entries for the flush
@inserve-paul
Copy link

@taylorotwell Could this fix also be backported to Laravel 10.x ?

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

Successfully merging a pull request may close this issue.

2 participants