Problem/Motivation

In #3209618: [Symfony 6] Symfony\Component\HttpKernel\Event\KernelEvent::isMasterRequest() is deprecated, use isMainRequest() instead we copied Symfony's KernelEvent to provide a compatibility bridge between Symfony 4 and 6. However, the bridge does not actually work in Symfony 5 and higher.

This is because of #3055198: [Symfony 5] Symfony/Component/EventDispatcher/Event is deprecated in Symfony 4.3 use Symfony/Contracts/EventDispatcher/Event instead where we replaced Symfony\Component\EventDispatcher\Event with another bridge class, but did not make the same change when we later copied the KernelEvent class.

Steps to reproduce

See https://www.drupal.org/pift-ci-job/2073268 from #3161889: [META] Symfony 6 compatibility

Proposed resolution

Replace Symfony\Component\EventDispatcher\Event with Drupal\Component\EventDispatcher\Event in Drupal\Core\Http\KernelEvent.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3215830.patch475 byteslongwave
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
FileSize
475 bytes
longwave’s picture

Title: Symfony 6 KernelEvent bridge is incompatible with Symfony 5 » Symfony 6 KernelEvent bridge is incompatible with Symfony 5 EventDispatcher
longwave’s picture

Issue summary: View changes
catch’s picture

Status: Needs review » Reviewed & tested by the community

Looks great.

alexpott’s picture

Version: 9.3.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 89fcf77b69 to 9.3.x and dde7102a5d to 9.2.x. Thanks!

  • alexpott committed 89fcf77 on 9.3.x
    Issue #3215830 by longwave: Symfony 6 KernelEvent bridge is incompatible...

  • alexpott committed dde7102 on 9.2.x
    Issue #3215830 by longwave: Symfony 6 KernelEvent bridge is incompatible...

Status: Fixed » Closed (fixed)

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