Closed (fixed)
Project:
Monitoring
Version:
8.x-1.x-dev
Component:
Sensors
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2025 at 09:45 UTC
Updated:
15 Mar 2026 at 15:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
bryandenijsHere is a patch to fix the issue.
Comment #3
bryandenijsI was a little bit too fast with the patch in #2.
Here is a new version.
Also dit a little bit of code-styling.
Comment #4
berdirContributions need to be done as merge requests. This will need to be done in a way that supports older core versions as well, similar to #3532529: Support requirement severity enums.
Comment #5
bryandenijsOk Thanks! I will create an updated MR.
Comment #7
bryandenijsComment #8
fagoI also ran into this. Testing the fix.
However, this patch will only work with Drupal 11.2+. What made the old constants go away? They should be still defined. Maybe something stopped including the install.inc file where the constants are defined?
Comment #9
bryandenijsYou are right that the fix only works for 11.2+, so maybe this needs a new major version?
About the old constants: they are still there, but they are deprecated and Core now uses new constants. See the core issue, mentioned in the issue description.
Comment #10
fagoThe old constants are deprecated, but still available. They should still work.
See https://git.drupalcode.org/project/drupal/-/commit/76dcf5a207d8f96c47508... and https://www.drupal.org/node/3410939
I can report that the patch works, thanks!
However, for merging it I'd think it would be best to make it work in a backwards-compatible way, e.g. using the deprecation helper.. Thus setting needs work for that.
Comment #11
bryandenijsI did not know that method. Thanks for pointing it out!
I updated the Merge Request. Should work now for older versions of Drupal too.
Comment #12
fagoThanks! However, both versions of the code seem to use the same SensorResultInterface constants?
Comment #13
bryandenijsThank you for the review. I don't fully understand what the problem is.
The old method used the
SensorResultInterface, while the new version uses theSensorResultDataInterface(where the constants are now located).Also, this interface (SensorResultDataInterface) is not deprecated and is located within the Monitoring module itself, so we should be able to continue using it.
Or am I overlooking something here?
Thanks again!
Comment #14
fagooops, of course - it's alright. I tested the update patch as well, it still works fine. Thus, this is ready!
Comment #16
berdirQuite a bit of code duplication but it's temporary, so I guess that's OK. And yes, no reason for changing our own constants, this isn't a deprecation, but I guess it also doesn't hurt.
Merged.