Fatal error when installing on D10

Created on 11 November 2022, about 2 years ago
Updated 4 December 2023, 12 months ago

Problem/Motivation

When installing this module on a D10 site I get this error

Fatal error: Declaration of Drupal\entity_usage_light\Routing\RouteSubscriber::getSubscribedEvents() must be compatible with Drupal\Core\Routing\RouteSubscriberBase::getSubscribedEvents(): array in /var/www/html/web/modules/contrib/entity_usage_light/src/Routing/RouteSubscriber.php on line 79

Steps to reproduce

On a D10 site. Install module

Proposed resolution

Fix issue

Remaining tasks

Fix
Review
Commit

User interface changes

NA

API changes

NA

Data model changes

NA

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States smustgrave

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany thomaswalther Rhein-Main Area

    This is also in other modules, the same file.

    Add function with ":array":

    sed -i 's/getSubscribedEvents() {/getSubscribedEvents():array {/g' ./modules/contrib/entity_usage_light/src/Routing/RouteSubscriber.php

Production build 0.71.5 2024