Error in Event Subscriber Function

Created on 19 February 2024, 4 months ago
Updated 29 February 2024, 4 months ago

Problem/Motivation

Fatal error: Declaration of Drupal\bookable_calendar\EventSubscriber\BookableCalendarRouteSubscriber::getSubscribedEvents() must be compatible with Drupal\Core\Routing\RouteSubscriberBase::getSubscribedEvents(): array in C:\xampp\htdocs\drupal\web\modules\contrib\bookable_calendar\src\EventSubscriber\BookableCalendarRouteSubscriber.php on line 28

Steps to reproduce

install a new module of 2.2.0 version. It will throw this error on enable module.

Proposed resolution

Replace public static function getSubscribedEvents()
// Method implementation
}

with

public static function getSubscribedEvents(): array {
// Method implementation
}

🐛 Bug report
Status

Needs review

Version

2.2

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024