Declaration of ItemController::create must be compatible with EntityDebugController::create

Created on 1 May 2024, 12 months ago

Problem/Motivation

PHP Fatal error: Declaration of Drupal\search_api_gendev\Controller\ItemController::create(Symfony\Component\DependencyInjection\ContainerInterface $container) must be compatible with Drupal\devel\Controller\EntityDebugController::create(Symfony\Component\DependencyInjection\ContainerInterface $container): static in /var/www/docroot/modules/contrib/search_api_gendev/src/Controller/ItemController.php on line 44

Steps to reproduce

composer require 'drupal/search_api_gendev:1.0.x-dev@dev'
drush en search_api_gendev

Proposed resolution

Adds : static to line 44 like this
public static function create(ContainerInterface $container): static {

Remaining tasks

Patch validation

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇨🇦Canada franckylfs Montreal

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

Comments & Activities

Production build 0.71.5 2024