v1.3 fails on Drupal 8

Created on 15 May 2024, 6 months ago
Updated 1 July 2024, 5 months ago

After installing v1.3 of the module on a Drupal 8.9.4 instance I get following error:

TypeError: Argument 1 passed to Drupal\username_enumeration_prevention\UserRouteEventSubscriber::onException() must be an instance   
of Symfony\Component\HttpKernel\Event\ExceptionEvent, instance of Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent    
given in Drupal\username_enumeration_prevention\UserRouteEventSubscriber->onException() (line 63 of                                  
/data/code/project/www/modules/contrib/username_enumeration_prevention/src/UserRouteEventSubscriber.php) #0 [internal           
function]:                                                                                                                           
Drupal\username_enumeration_prevention\UserRouteEventSubscriber->onException(Object(Symfony\Component\HttpKernel\Event\GetResponseF  
orExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))                     
#1 /data/code/project/www/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111):                     
call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent), 'kernel.exceptio...',                 
Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))                                                              
#2 /data/code/project/vendor/symfony/http-kernel/HttpKernel.php(227):                                                           
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.exceptio...',                                       
Object(Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent))                                                             
#3 /data/code/project/vendor/symfony/http-kernel/HttpKernel.php(79):                                                            
Symfony\Component\HttpKernel\HttpKernel->handleException(Object(Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException),      
Object(Symfony\Component\HttpFoundation\Request), 1)                                                                                 
#4 /data/code/project/www/core/lib/Drupal/Core/StackMiddleware/Session.php(57):                                                 
Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)                           
#5 /data/code/project/www/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47):                                         
Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)                               
#6 /data/code/project/www/core/modules/page_cache/src/StackMiddleware/PageCache.php(191):                                       
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)                       
#7 /data/code/project/www/core/modules/page_cache/src/StackMiddleware/PageCache.php(128):                                       
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true)                        
#8 /data/code/project/www/core/modules/page_cache/src/StackMiddleware/PageCache.php(82):                                        
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true)                       
#9 /data/code/project/www/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47):                                  
Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)                       
#10 /data/code/project/www/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52):                                  
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)                
#11 /data/code/project/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23):                                                
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)                 
#12 /data/code/project/www/core/lib/Drupal/Core/DrupalKernel.php(708):                                                          
Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)                                           
#13 /data/code/project/www/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))    
#14 {main}.                   

At first sight it's because of Drupal 10 changes, so v1.3 is not really compatible anymore with Drupal 8 and 9. It probably would have been better to make a v2.x instead of v1.3 for Drupal 10.

🐛 Bug report
Status

Closed: won't fix

Version

1.3

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024