Fixed
Project:
Search API Typesense
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jun 2026 at 07:57 UTC
Updated:
23 Jul 2026 at 14:34 UTC
Jump to comment: Most recent
On PHP 8.5, BoolDataType::getValue() triggers a deprecation because it uses the non-canonical (boolean) cast. PHP 8.5 deprecates the long-form scalar casts in favour of
their canonical short forms.
Deprecated: Non-canonical cast (boolean) is deprecated, use the (bool) cast instead in src/Plugin/search_api/data_type/BoolDataType.php on line 25
Root cause: BoolDataType::getValue() casts the value with (boolean) instead of (bool).
typesense_bool data type).BoolDataType::getValue() runs.Deprecated: Non-canonical cast (boolean) ... notice (or as a deprecation under PHPUnit --display-deprecations).Use the canonical (bool) cast.
public function getValue($value): bool {
- return (boolean) $value;
+ return (bool) $value;
}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
ayalon commentedComment #4
pfrenssenSimple fix, looks good! The PHPStan failure is unrelated, is handled in #3600935: PHPStan warning: using nullsafe method call on non-nullable type.
Comment #7
lussolucaReleased in 1.2.0-beta3, thanks!