Problem/Motivation

Symfony has deprecated a load of response and request event classes and we need to update to using the new names. There are no trigger errors because the classes are still part of the inheritance chain. However in order to prep for SF5 we need should do the work.

Proposed resolution

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
118.64 KB

One interesting question is should we leave the typehints alone for maximum SF4 compatibility?

mikelutz’s picture

klausi’s picture

Status: Needs review » Needs work

Patch does not apply anymore.

klausi’s picture

Issue tags: +Novice, +Needs reroll
martin107’s picture

Assigned: Unassigned » martin107

I will sort out the reroll.

martin107’s picture

Status: Needs work » Needs review
FileSize
118.63 KB

reroll.

martin107’s picture

Issue tags: -Needs reroll
FileSize
118.71 KB
1.23 KB

Fixed a problem common to many failures.

Status: Needs review » Needs work

The last submitted patch, 8: 3094398-8.patch, failed testing. View results

martin107’s picture

Status: Needs work » Needs review
FileSize
120.83 KB
2.12 KB

ActiveLinkResponseFilterTest now passes locally.

This is part of a larger thing, but it will be good to use symfony 5

martin107’s picture

Assigned: martin107 » Unassigned
thalles’s picture

#10 applied with success!
Thanks @martin107!

klausi’s picture

Status: Needs review » Needs work

GetResponseEvent and FilterResponseEvent replacements look good.

Looks like we did not catch all TerminateEvent:

❯ ag TerminateEvent
core/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php
10:use Symfony\Component\HttpKernel\Event\TerminateEvent;
62:  public function onKernelTerminate(TerminateEvent $event) {

core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php
9:use Symfony\Component\HttpKernel\Event\TerminateEvent;
57:   * @param \Symfony\Component\HttpKernel\Event\TerminateEvent $event
60:  public function onTerminate(TerminateEvent $event) {

core/modules/user/src/EventSubscriber/UserRequestSubscriber.php
9:use Symfony\Component\HttpKernel\Event\TerminateEvent;
47:   * @param \Symfony\Component\HttpKernel\Event\TerminateEvent $event
50:  public function onKernelTerminate(TerminateEvent $event) {

core/modules/jsonapi/src/EventSubscriber/ResourceObjectNormalizationCacher.php
9:use Symfony\Component\HttpKernel\Event\TerminateEvent;
108:   * @param \Symfony\Component\HttpKernel\Event\TerminateEvent $event
111:  public function onTerminate(TerminateEvent $event) {

core/modules/jsonapi/tests/src/Kernel/EventSubscriber/ResourceObjectNormalizerCacherTest.php
12:use Symfony\Component\HttpKernel\Event\TerminateEvent;
88:    $event = $this->prophesize(TerminateEvent::class);

core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php
8:use Symfony\Component\HttpKernel\Event\TerminateEvent;
42:   * @param \Symfony\Component\HttpKernel\Event\TerminateEvent $event
45:  public function onKernelTerminate(TerminateEvent $event) {

core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php
7:use Symfony\Component\HttpKernel\Event\TerminateEvent;
38:   * @param Symfony\Component\HttpKernel\Event\TerminateEvent $event
41:  public function onTerminate(TerminateEvent $event) {
klausi’s picture

Status: Needs work » Reviewed & tested by the community

Sorry for the confusion, I should have checked for PostResponseEvent which was replaced by TerminateEvent.

That also looks good, thanks!

xjm’s picture

Issue tags: +beta target

  • catch committed ca1aa9e on 9.1.x
    Issue #3094398 by martin107, alexpott, andypost, klausi: Update Symfony...

  • catch committed 51625ae on 9.0.x
    Issue #3094398 by martin107, alexpott, andypost, klausi: Update Symfony...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.1.x and cherry-picked to 9.0.x, thanks!

Status: Fixed » Closed (fixed)

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