Problem/Motivation

In #3209618: [Symfony 6] Symfony\Component\HttpKernel\Event\KernelEvent::isMasterRequest() is deprecated, use isMainRequest() instead we added a class alias for Symfony\Component\HttpKernel\Event\KernelEvent in DrupalKernel. This works but it is not ideal because if you don't load the DrupalKernel class then the class alias is not in place. This isn't much of an issue normally but in unit tests it might mean the alias is not in place.

Proposed resolution

Add core/class_aliases.php as an autoload file in core/composer.json to ensure the class alias is always in place.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
3.38 KB
Neslee Canil Pinto’s picture

Status: Needs review » Reviewed & tested by the community

This seems to be pretty right, moving to RTBC.
The patch creates a class that will be added by the autoloader

This works but it is not ideal because if you don't load the DrupalKernel class then the class alias is not in place. This isn't much of an issue normally but in unit tests it might mean the alias is not in place.

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed a9fbf27 and pushed to 9.3.x. Thanks!

Cherry-picked to 9.2.x

  • larowlan committed 1961a34 on 9.2.x
    Issue #3214234 by alexpott: Add core/class_aliases.php
    
    (cherry picked...
  • larowlan committed a9fbf27 on 9.3.x
    Issue #3214234 by alexpott: Add core/class_aliases.php
    
larowlan’s picture

Version: 9.3.x-dev » 9.2.x-dev

Status: Fixed » Closed (fixed)

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