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:113return (boolean) $this->sensorConfig->isEnabled();
  • src/Entity/SensorConfig.php:325return (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

Command icon 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

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review
mably’s picture

Issue summary: View changes