Implicitly marking parameter as nullable is deprecated

Created on 3 September 2025, about 2 months ago

Problem/Motivation

With PHP 8.4 and Drupal 10.5.2

Deprecated: Drupal\search_api_glossary\Plugin\search_api\processor\Glossary::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /app/docroot/modules/contrib/search_api_glossary/src/Plugin/search_api/processor/Glossary.php on line 46the explicit nullable type must be used instead

Proposed resolution

Change the line 46 in search_api_glossary/srcPlugin/search_api/processor/Glossary.php adding the explicit nullable type before the type DatasourceInterface.

from:

public function getPropertyDefinitions(DatasourceInterface $datasource = NULL) {

to:

public function getPropertyDefinitions(?DatasourceInterface $datasource = NULL) {

🐛 Bug report
Status

Active

Version

4.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024