Problem/Motivation

Saw the following warnings on a D11 site using the D11 compatibility patch when viewing an entity in Search API Gendev:

Deprecated: Drupal\search_api_gendev\Form\ItemForm::buildForm(): Implicitly marking parameter $entity as nullable is deprecated, the explicit nullable type must be used instead in /data/app/modules/contrib/search_api_gendev/src/Form/ItemForm.php on line 67

Deprecated: Drupal\search_api_gendev\Form\ItemForm::buildForm(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /data/app/modules/contrib/search_api_gendev/src/Form/ItemForm.php on line 67

Steps to reproduce

  1. Start with a Drupal site on PHP 8.4
  2. View any entity under the Devel > Search API tabs

Proposed resolution

Add explicit nullability to aforementioned checks, look for other typed arguments that default to NULL.

Remaining tasks

  • Apply the change
  • Test

User interface changes

None.

API changes

Hopefully none, may affect integration with Drupal core or other modules.

Data model changes

None.

Comments

geoffreyr created an issue. See original summary.

  • birk committed 2cd1f6c7 on 1.0.x
    fix: #3560689 PHP 8.4 compatibility issues
    
birk’s picture

Thank you for the report, it's fixed and I'll try getting around to making a new release.

birk’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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