1. In Laravel 9, after executing Redis::set($this->rules_update_key, Carbon::now());, I found that the written value is an Object. See Figure 1.

2. However, in the test environment, the written value is a datetime string. Its value: 2024-01-30 06:00:00. See Figure 2.

3. Finally, after comparing, I found that the root cause of the difference is that in the .env file, the test environment has an additional line of configuration:
Plaintext
REDIS_CLIENT=predis
