Argument #1 ($redis) must be of type Redis, Predis\Client given

Created on 20 December 2022, over 1 year ago
Updated 21 March 2023, over 1 year ago

Error apparently caused by library

TypeError: RateLimit\RedisRateLimiter::__construct(): Argument #1 ($redis) must be of type Redis, Predis\Client given, called in . . . crawler_rate_limit/src/RateLimitManager.php on line 90 in RateLimit\RedisRateLimiter->__construct() (line 21 of . . . /vendor/nikolaposa/rate-limit/src/RedisRateLimiter.php)

filling the log - had to uninstall for now

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bobburns

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡·πŸ‡ΈSerbia vaish

    @bobburns I have new version of the module ready if you would be willing to try it. I didn't make the release yet, waiting to get some feedback first but code should be stable and usable.

    New version supports both Redis PECL extensions as well as Predis PHP package. In addition you can also chose to use APCu or Memcached. Up to date documentation can be found in the README file: https://git.drupalcode.org/project/crawler_rate_limit/-/blob/2.x/README.md

    You can install this version and all dependencies (Predis package and Redis module) with the following commands:


    composer require predis/predis:^1.1.1 drupal/redis drupal/crawler_rate_limit:2.x-dev@dev
    drush en redis crawler_rate_limit

    I tested this version with Drupal 9 and 10 and PHP 7.4 and 8.1.

  • Status changed to Closed: outdated over 1 year ago
  • πŸ‡·πŸ‡ΈSerbia vaish

    Version 2.1-beta1 of module introduced a lot of changes and improvements and hopefully this issue is not relevant anymore.

Production build 0.69.0 2024