Deprecated function: Creation of dynamic property Drupal\monitoring\Result\SensorResult::$requirements is deprecated in Drupal\monitoring\Plugin\monitoring\SensorPlugin\RequirementsRecapSensorPlugin

Created on 10 September 2025, 8 days ago

Problem/Motivation

Shortly after introducing the RequirementsRecapSensorPlugin a new version of PHP was released that deprecated the dynamic creation of properties.

Now we're seeing these errors in watchdog:

Deprecated function: Creation of dynamic property Drupal\monitoring\Result\SensorResult::$requirements is deprecated in Drupal\monitoring\Plugin\monitoring\SensorPlugin\RequirementsRecapSensorPlugin->runSensor() (line 69 of /app/web/modules/contrib/monitoring/src/Plugin/monitoring/SensorPlugin/RequirementsRecapSensorPlugin.php)

Proposed resolution

It would be nicer, if we could set the data \Drupal\monitoring\Result\SensorResult::setResultData but the method is protected, so I'm proposing to create a property on the RequirementsRecapSensorPlugin itself.

Alternatively we could drop the additional info from the resultVerbose but I still find it helpful to quickly see the requirements errors and warnings.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇸🇮Slovenia useernamee Ljubljana

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024