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

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

solideogloria created an issue. See original summary.

solideogloria’s picture

Status: Active » Needs review
ivnish’s picture

Thanks!

ivnish’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.