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.
Issue fork monitoring-3546021
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
useernamee commentedComment #4
useernamee commentedComment #5
fagoMR seems all good. Uploading a patch for use with composer-patches also + giving it a test now.
Comment #6
fagoThe MR correctly addresses the issue also.
Comment #7
berdirMerged.