Problem/Motivation

If you run 8.x-1.6 on latest D8, you would get this error:

The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\enforce_user_fields\EventSubscriber\EnforceUserFieldsSubscriber::checkForUserFields() must be an instance of Symfony\Component\HttpKernel\Event\RequestEvent, instance of Symfony\Component\HttpKernel\Event\GetResponseEvent given in Drupal\enforce_user_fields\EventSubscriber\EnforceUserFieldsSubscriber->checkForUserFields() (line 92 of modules/contrib/enforce_user_fields/src/EventSubscriber/EnforceUserFieldsSubscriber.php).
Drupal\enforce_user_fields\EventSubscriber\EnforceUserFieldsSubscriber->checkForUserFields(Object, 'kernel.request', Object)
call_user_func(Array, Object, 'kernel.request', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.request', Object) (Line: 127)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

This is because, in commit https://git.drupalcode.org/project/enforce_user_fields/-/commit/5d974918... , the changes include more than the patch from #3264632: Support password reset UX, and removed deprecated Symfony\Component\HttpKernel\Event\GetResponseEvent

Steps to reproduce

Install the module on D8 and visit any page.

Proposed resolution

1. Merge 8.x-1.6 to 2.0.x
2. Edit the module compatibility, make it D9 only, make a new release
3. Merge 8.x-1.6 back to 8.x-1.x
4. Commit this patch
5. Make a new release 8.x-1.7

Remaining tasks

User interface changes

API changes

See #3094398: Update Symfony response and request events to new classes

Data model changes

CommentFileSizeAuthor
#2 3268304-2.patch1.03 KBskyredwang

Comments

skyredwang created an issue. See original summary.

skyredwang’s picture

Status: Active » Needs review
StatusFileSize
new1.03 KB

cosolom’s picture

Status: Needs review » Fixed

Thank you. Commited

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.