Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
mglamanI think this was punted for Symfony 7. Need to check.