Problem/Motivation

After upgrading to Drupal 10.1.0 the page shows a WSOD with the following error:

Error: Call to undefined method Symfony\Component\HttpKernel\Event\RequestEvent::isMasterRequest() in Drupal\rest_api_access_token\EventSubscriber\CacheEndpointSubscriber->onKernelRequest() (line 86 of modules/contrib/rest_api_access_token/src/EventSubscriber/CacheEndpointSubscriber.php).

call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 142)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 270)
Drupal\shield\ShieldMiddleware->bypass() (Line: 169)
Drupal\shield\ShieldMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon 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

Anybody created an issue. See original summary.

tolstoydotcom’s picture

From CHANGELOG.md for 5.3 of Symfony's http-kernel: "Deprecate `KernelEvent::isMasterRequest()` and add `isMainRequest()` as replacement".

I could provide a patch but due to other issues it's probably best to make the change manually.

guilherme-lima-almeida’s picture

Status: Active » Needs review
StatusFileSize
new524 bytes

Hi @TolstoyDotCom,

Despite what you said, I'll create a patch even if it's just me using it. This way, in future updates, I can keep track of the changes on this issue.

trickfun’s picture

Patch works!
Thank you

mukhtarm’s picture

Way to go. This patch is not yet available in '2.0.0' version. The installation still fails on D10 :(

flyke made their first commit to this issue’s fork.

flyke changed the visibility of the branch 3368352-not-compatible-with-d10 to hidden.

flyke’s picture

I updated my project that uses rest_api_access_token and noticed that the patch did not apply.
So I checked out this issue and saw that the status is 'Needs review' which should mean that its not included in the codebase yet.
I saw #5 and assumed this issue still needed an updated patch for latest stable or dev version.
Which is why I started an Issue Fork.
But when I looked at the base code, the adjustment was already there.
I looked at the source code and this seems already ok in:
- 2.0.x
- 2.0.2
- 2.0.1

So I think this issue can just be closed instead of 'Needs review' ?

guilherme-lima-almeida’s picture

Status: Needs review » Reviewed & tested by the community