Drupal version

9.2.0

Problem / Motivation

https://www.drupal.org/node/3212750

The method Symfony\Component\HttpKernel\Event\KernelEvent::isMasterRequest() is deprecated in Symfony 5.3. The method has been replaced by Symfony\Component\HttpKernel\Event\KernelEvent::isMainRequest(). In Drupal 9 we are using Symfony 4. In Drupal 10 we are wanting to use Symfony 6, therefore we need to add the deprecations of Symfony 5 in Drupal 9.

The deprecation isn't caught because it's only a runtime error

+    /**
+     * Checks if this is a master request.
+     *
+     * @return bool True if the request is a master request
+     */
+    public function isMasterRequest()
+    {
+        @trigger_error('Symfony\Component\HttpKernel\Event\KernelEvent::isMasterRequest() is deprecated, use isMainRequest()', E_USER_DEPRECATED);
+        return HttpKernelInterface::MASTER_REQUEST === $this->requestType;
+    }

Comments

mglaman created an issue. See original summary.

mglaman’s picture

Status: Active » Postponed (maintainer needs more info)

I think this was punted for Symfony 7. Need to check.