Use AccountProxyInterface instead of AccountProxy

Created on 2 November 2018, over 6 years ago
Updated 30 June 2023, almost 2 years ago

After update from beta1 to beta3 I got this error:

The website encountered an unexpected error. Please try again later.
TypeError: Argument 4 passed to Drupal\session_limit\Services\SessionLimit::__construct() must be an instance of Drupal\Core\Session\AccountProxy, instance of Drupal\restrict_by_ip\Session\AccountProxy given, called in /var/www/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 286 in Drupal\session_limit\Services\SessionLimit->__construct() (line 108 of modules/contrib/session_limit/src/Services/SessionLimit.php).
...

As far I can see, in #2674242: Remove static calls to the config service and inject it instead β†’ there was a refactoring in the SessionLimit service class that adds the use of AccountProxy instead of the AccountProxyInterface. Such thing makes my site fail since the restrict_by_ip module has its own implementation of the AccountProxyInterface.

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain manuel.adan 🌌

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.

Production build 0.71.5 2024