Problem/Motivation
If you use the restrict_by_ip module (just one example), you are unable to access the Flood Unblock page at admin/people/flood-unblock. When you try, you get an error.
Steps to reproduce
* Install and enable restrict_by_ip
* Install and enable flood_control
* Go to admin/people/flood-unblock
* Observe error:
The website encountered an unexpected error. Please try again later.
TypeError: Argument 4 passed to Drupal\flood_control\Form\FloodUnblockAdminForm::__construct() must be an instance of Drupal\Core\Session\AccountProxy, instance of Drupal\restrict_by_ip\Session\AccountProxy given, called in /app/web/modules/contrib/flood_control/src/Form/FloodUnblockAdminForm.php on line 83 in Drupal\flood_control\Form\FloodUnblockAdminForm->__construct() (line 67 of modules/contrib/flood_control/src/Form/FloodUnblockAdminForm.php).
Proposed resolution
Update the class to use the AccountProxyInterface to make it compatible with other modules that provide their own account proxy.
Issue fork flood_control-3292868
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
nicrodgersComment #4
jonnyhocks commentedReproduced the error on a fresh install of Drupal along with restrict_by_ip. Reviewed the changes and tested them and can confirm that the error detailed no longer displays after applying the changes.
Comment #6
fabianderijkThanks, I've just merged the MR