Problem/Motivation
On PHP 8.5, loading sensor plugins triggers the following deprecation:
Deprecated function: Non-canonical cast (boolean) is deprecated, use the (bool) cast instead in include() (line 576 of /var/www/html/vendor/composer/ClassLoader.php)The cast is parsed at file include time. Two occurrences in the module:
src/SensorPlugin/SensorPluginBase.php:113—return (boolean) $this->sensorConfig->isEnabled();src/Entity/SensorConfig.php:325—return (boolean) $this->status;
Proposed resolution
Replace (boolean) with the canonical (bool) cast at both locations.
Remaining tasks
Merge request.
API changes
None.
Issue fork monitoring-3586539
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 #3
mably commentedComment #4
mably commented