Problem/Motivation

See related #3241412: [PHP 8.1] DrupalCacheArray deprecation notices due to tentative return types.

Apply fixes to DatabaseStatementEmpty and DatabaseStatementBase

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3241427

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Ayesh created an issue. See original summary.

mcdruid made their first commit to this issue’s fork.

mcdruid’s picture

Status: Active » Needs review
mcdruid’s picture

sqlite test failure in #3224299-24: [META] Make Drupal 7 core compatible with PHP 8.1 reveals some more of these:

Deprecated function: Return type of
DatabaseStatementPrefetch::current() should either be compatible with
Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute
should be used to temporarily suppress the notice in include_once()
(line 22 of /var/www/html/includes/database/prefetch.inc).

Deprecated function: Return type of DatabaseStatementPrefetch::next()
should either be compatible with Iterator::next(): void, or the
#[\ReturnTypeWillChange] attribute should be used to temporarily
suppress the notice in include_once() (line 22 of
/var/www/html/includes/database/prefetch.inc).

Deprecated function: Return type of DatabaseStatementPrefetch::key()
should either be compatible with Iterator::key(): mixed, or the
#[\ReturnTypeWillChange] attribute should be used to temporarily
suppress the notice in include_once() (line 22 of
/var/www/html/includes/database/prefetch.inc).

Deprecated function: Return type of                                  
DatabaseStatementPrefetch::valid() should either be compatible with
Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute
should be used to temporarily suppress the notice in include_once()
(line 22 of /var/www/html/includes/database/prefetch.inc).

Deprecated function: Return type of
DatabaseStatementPrefetch::rewind() should either be compatible with
Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute
should be used to temporarily suppress the notice in include_once()
(line 22 of /var/www/html/includes/database/prefetch.inc).

  • mcdruid committed 21775ee on 7.x
    Issue #3241427 by Ayesh, mcdruid: [PHP 8.1] Database classes signature...
mcdruid’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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