Problem/Motivation
Drupal 7 on PHP 8.1 emits deprecation notices due to signature mismatches with the PHP built-in ArrayAccess class and Drupal's DrupalCacheArray class.
Steps to reproduce
Run Drupal 7 on PHP 8.1
Proposed resolution
Add #[ReturnTypeWillChange] attribute to all mismatching method declarations in the DrupalCacheArray class.
Remaining tasks
Add #[ReturnTypeWillChange] attribute to all mismatching method declarations in the DrupalCacheArray class.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
N/A
Details:
- RFC
- PHP 8.1: Return types in PHP built-in class methods and deprecation notices
- PHP 8.1: New #[ReturnTypeWillChange] attribute
Issue fork drupal-3241412
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
Comment #5
mcdruid commentedComment #7
mcdruid commentedThanks @Ayesh!