Problem/Motivation

Using non-standard cast names is deprecated in PHP 8.5 beta1

Steps to reproduce

- https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_non-standard_cas...
- https://github.com/php/php-src/commit/3bf21a0d43e8bc8084a19937e5d5dc354f...

Proposed resolution

replace usage with standard casts

Remaining tasks

- find all usage
- replace via MR
- review and commit as PHP 8.5 beta1 is out

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3540528

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

andypost created an issue. See original summary.

andypost’s picture

Status: Active » Needs review
andypost’s picture

jacktonkin’s picture

There’s a PHPCS rule in slevomat/coding-standard:

https://github.com/slevomat/coding-standard/blob/master/doc/php.md#slevo...

andypost’s picture

Thank you @jacktonkin it can catch!

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Including this as a coding standards rule makes sense, and to me it doesn't need to run through the Coding Standards Committee, because it's a language-level decision and there's nothing we can change or document about it.

Since this passes the new rule, we can be sure we caught all the changes.

  • alexpott committed 2d8538d9 on 10.5.x
    Issue #3540528 by andypost, jacktonkin: Clean-up deprecated non-standard...
alexpott’s picture

Version: 11.x-dev » 10.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed fc1872a and pushed to 11.x. Thanks!

Backported to 11.2.x,10.6.x,10.5.x without the PHPCS rule
Committed 71976f3 and pushed to 11.2.x. Thanks!
Committed e35092a and pushed to 10.6.x. Thanks!
Committed 2d8538d and pushed to 10.5.x. Thanks!

  • alexpott committed e35092ab on 10.6.x
    Issue #3540528 by andypost, jacktonkin: Clean-up deprecated non-standard...

  • alexpott committed 71976f38 on 11.2.x
    Issue #3540528 by andypost, jacktonkin: Clean-up deprecated non-standard...

  • alexpott committed fc1872ae on 11.x
    Issue #3540528 by andypost, jacktonkin: Clean-up deprecated non-standard...

Status: Fixed » Closed (fixed)

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