Problem/Motivation
The code contains a non-canonical scalar type cast, like (boolean), which is deprecated in PHP 8.5. The alternate type names are not supported in parameter, return, or property types, either.
https://php.watch/versions/8.5/boolean-double-integer-binary-casts-depre...
Steps to reproduce
public function fileExists($id) {
return (boolean) \Drupal::request()->files->has("files[$id]");
}
Search the code using the regex \(integer\)|\(boolean\)|\(double\)|\(binary\) to find type casts. There may be parameters, return types, or property types that need to be updated as well.
Proposed resolution
int instead of integer
float instead of double
bool instead of boolean
string instead of binary
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #3
solideogloria commentedComment #4
ivnishThanks!
Comment #6
ivnish