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

CommentFileSizeAuthor
#2 3444684.patch546 bytesfranckylfs
Command icon 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

    FranckyLFS created an issue. See original summary.

    franckylfs’s picture

    StatusFileSize
    new546 bytes

    • birk committed 0d450ed0 on 1.0.x
      Issue #3444684 by franckylfs: Declaration of ItemController::create must...
    birk’s picture

    Status: Needs review » Fixed

    Thank you, sorry for the loooong reply time.

    franckylfs’s picture

    Thanks to you. Better late than never, they say ;)

    Status: Fixed » Closed (fixed)

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