Problem/Motivation
On PHP 8.4+, Drupal logs a deprecation warning from Voting API:
Deprecated function: Drupal\votingapi\VoteAccessControlHandler::checkFieldAccess(): Implicitly marking parameter $items as nullable is deprecated, the explicit nullable type must be used instead.
Steps to reproduce
1. Run a Drupal site with Voting API enabled on PHP 8.5
2. Login with elevated role and access the page /admin/content/vote.
3. Observe deprecation message mentioned above
Proposed resolution
Update the method signature in VoteAccessControlHandler::checkFieldAccess()
- Replace implicit nullable style:
SomeType $items = NULL
- With explicit nullable style:
?SomeType $items = NULL
Also review related overrides in the module for similar implicit nullable typed parameters and update them for PHP 8.4 compatibility.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork votingapi-3589884
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