One of my sites just auto-updated WP Fail2Ban to 5.2.2, and the following error came up. I then reproduced by manually updating from 5.2.1 to 5.2.2 on another site.
[Sun Jan 28 16:19:57.871449 2024] [proxy_fcgi:error] [pid 127891:tid 139808850159168] [client 76.118.100.248:52218] AH01071: Got error ‘PHP message: PHP Warning: require_once(/srv/www/SITE/public_html/wp-content/plugins/wp-fail2ban/vendor/freemius/wordpress-sdk/includes/class-fs-garbage-collector.php): Failed to open stream: No such file or directory in /srv/www/SITE/public_html/wp-content/plugins/wp-fail2ban/vendor/freemius/wordpress-sdk/require.php on line 22PHP message: PHP Fatal error: Uncaught Error: Failed opening required ‘/srv/www/SITE/public_html/wp-content/plugins/wp-fail2ban/vendor/freemius/wordpress-sdk/includes/class-fs-garbage-collector.php’ (include_path=’.:/usr/share/php’) in /srv/www/SITE/public_html/wp-content/plugins/wp-fail2ban/vendor/freemius/wordpress-sdk/require.php:22\nStack trace:\n#0 /srv/www/SITE/public_html/wp-content/plugins/wp-fail2ban/vendor/freemius/wordpress-sdk/start.php(514): require_once()\n#1 /srv/www/SITE/public_html/wp-content/plugins/wp-fail2ban/freemius.php(39): require_once(‘…’)\n#2 /srv/www/SITE/public_html/wp-content/plugins/wp-fail2ban/freemius.php(67): org\lecklider\charles\wordpress\wp_fail2ban\wf_fs()\n#3 /srv/www/SITE/public_html/wp-content/plugins/wp-fail2ban/wp-fail2ban.php(55): require_once(‘…’)\n#4 /srv/www/SITE/public_html/wp-settings.php(473): include_once(‘…’)\n#5 /srv/www/SITE/public_html/wp-config.php(91): require_once(‘…’)\n#6 /srv/www/SITE/public_html/wp-load.php(50)…’, referer: https://www.SITE/wp-admin/plugins.php
Disabling the plugin fixes the error. Completely removing the folder, then reinstalling it with wp plugin install --activate wp-fail2ban
causes the error to return. Commenting out line 22 in require.php seems to work temporarily as class-fs-garbage-collector.php doesn’t exist.