Problem/Motivation
The "Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent::getException()" method is deprecated since Symfony 4.4, use "getThrowable()" instead
See https://www.drupal.org/pift-ci-job/1622423
The whole Symfony class GetResponseForExceptionEvent is deprecated, so we need to replace it everywhere.
Proposed resolution
Replace all GetResponseForExceptionEvent in core at once.
Remaining tasks
Commit patch.
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 3113876-15.patch | 38.4 KB | jungle |
Comments
Comment #2
himmatbhatia commentedComment #3
himmatbhatia commentedI have fixed the problem and attaching the patch file.
Comment #5
himmatbhatia commentedOne place was missed so changed that place as well and attaching patch
Comment #7
longwaveThe fails here make me think that we should just be replacing all these in one go, rather than module by module.
Comment #8
hardik_patel_12 commentedKindly review a new patch.
Comment #9
hardik_patel_12 commentedComment #11
hardik_patel_12 commentedKindly review a new patch.
Comment #12
hardik_patel_12 commentedComment #14
jungleAgree with @longwave, let's do it in one go
Comment #15
jungleComment #16
jungleduplicated probably
Comment #17
jungle#3094398 did two types of fixes. From the point of scope, maybe this one should be kept.
Comment #18
jungleComment #19
klausiNice thanks!
I checked manually that there are no remaining GetResponseForExceptionEvent references in core.
Comment #20
himmatbhatia commentedComment #21
catchCommitted a5fb386 and pushed to 9.1.x. Thanks!
Comment #22
jungle@catch. Thank you for committing! One more question, Should it be committed to 9.0.x as well?
Comment #24
xjmIt looks like this might not have been pushed to 9.1.x. Since it's a 40K patch that could end up needing rerolls and since it's not working hours where @catch is, I recommitted the patch. (I have not reviewed it myself.)
I wouldn't backport this to 9.0.x because there are some potentially disruptive changes in it (changed typehints etc.). Since it's event subscribers and so forth it's an internal change, but probably not recommended during beta. So, setting to 9.1.x unless @catch has other thoughts.
Comment #26
catchSorry folks I got distracted and didn't push the commits last night.
I do think this is OK to backport to 9.0.x, it will help contrib modules to not have the deprecation message suppressed and every change is @internal. Already did that last night, but also pushed the commit this morning.
Comment #27
jungleThanks, @catch and @xjm! looking forward to #3114122: ExceptionLoggingSubscriber should log 403 access denied reason being landed soon, which was blocked by this one.
Comment #29
gábor hojtsyFound this issue from an Upgrade Status report. While I understand this is out of the supported API realm, if someone has bright ideas to help cover #3131063: Detect GetResponseForExceptionEvent is deprecated in favour of ExceptionEvent that would be useful nonetheless.