Closed (fixed)
Project:
Site Alert
Version:
8.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
10 Feb 2020 at 09:35 UTC
Updated:
7 Jul 2021 at 02:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedDenisCi created an issue. See original summary.
Comment #2
Anonymous (not verified) commentedComment #3
Anonymous (not verified) commentedI hopped if I edit it won't create a new post but will upload the patch bellow issue report. Well here is the fixed name of the patch. Sorry.
Comment #4
pfrenssenThanks for picking this up!
We shouldn't call
\Drupal::messenger()in OO code. The\Drupalclass is only intended to be able to call into services from legacy procedural code such as hook implementations etc. Instead we should inject the messenger service.Luckily the entity forms already inject the messenger service so this can be easily fixed by changing the code to the following:
Comment #5
swatichouhan012 commentedComment #6
swatichouhan012 commentedHere is new patch according #4, Kindly review.
Comment #7
Anonymous (not verified) commentedHello, thanks for the fix @swatichouhan012. I didn't have time to fix it yesterday. I tested your patch with unit tests and it worked flawlessly with no errors reported.
Comment #9
pfrenssenThanks! Merged in 8.x-1.x.
Comment #10
Anonymous (not verified) commented