Problem/Motivation

After module installation, running drush rebuild:

PHP Fatal error:  Declaration of Drupal\paragraph_instances\Controller\InstancesController::create(Drupal\paragraph_instances\Controller\ContainerInterface $container) must be compatible with Drupal\Core\Controller\ControllerBase::create(Symfony\Component\DependencyInjection\ContainerInterface $container) in /var/www/my_site/web/modules/contrib/paragraph_instances/src/Controller/InstancesController.php on line 171

tested with Drupal 9.3.15

CommentFileSizeAuthor
#5 php-error-fix-3291630-5.patch528 bytesdikshi suthar

Comments

Bohus Ulrych created an issue. See original summary.

  • emarcarelli committed 02c684e on 1.0.x
    Issue #3291630: PHP Fatal error:  Declaration of Drupal\...
dikshi suthar’s picture

Assigned: Unassigned » dikshi suthar
emarcarelli’s picture

Assigned: dikshi suthar » Unassigned

Bohus Ulrych can you confirm if this is fixed in 1.0.x-dev?

dikshi suthar’s picture

StatusFileSize
new528 bytes

In version 1.0.1 namespace is missing in InstancesController.php
use Symfony\Component\DependencyInjection\ContainerInterface;
Please update as per patch.

bohus ulrych’s picture

Yes, with this update (v1.0.2) I'm able to enable this module.
But there is another bug, I'm going to create another ticket.

emarcarelli’s picture

Status: Active » Fixed

  • emarcarelli committed 6a6016c on 1.0.x
    Issue #3291630: PHP Fatal error:  Declaration of...
    

Status: Fixed » Closed (fixed)

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