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
- Start with a Drupal site on PHP 8.4
- 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
Comment #3
birk commentedThank you for the report, it's fixed and I'll try getting around to making a new release.
Comment #4
birk commented