Problem/Motivation
I get this error when trying to enable the module on PHP 8.
Deprecated: Required parameter $tags follows optional parameter $expire in /var/www/html/web/modules/contrib/redis/src/Cache/CacheBase.php on line 360
The website encountered an unexpected error. Please try again later.
Steps to reproduce
Setup Drupal 9.1 on PHP 8 with Redis extension. Add the module, enable it, and add settings required to use Redis for caching.
See https://github.com/hussainweb/drupal-php8-composer2 for sample setup with Drupal 9 and PHP 8.
Proposed resolution
Fix the deprecation by giving a default value for $tags.
Remaining tasks
Patch
User interface changes
None
API changes
Technically, none because currently, the required parameter $tags would be optional anyway.
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3174685-2.patch | 602 bytes | hussainweb |
Comments
Comment #2
hussainwebJust this change is enough to get it working. See screenshots at https://twitter.com/hussainweb/status/1312472573825802240
Comment #3
sweetchuckComment #4
berdirThanks, I went in the opposite direction and just made both arguments required. It practically already was, not passing tags would not have worked.