Account created on 28 October 2021, about 3 years ago
#

Recent comments

I was able to reproduce this error in Drupal 10, looking at the Core RouteSubscriber libraries, adding ":array" in the function declaration solved my problem.

/**
* {@inheritdoc}
*/
public static function getSubscribedEvents(): array {
$events = parent::getSubscribedEvents();
$events[RoutingEvents::ALTER] = ['onAlterRoutes', 100];
return $events;
}

I leave the patch in the hands of whoever wants to do it.
Greetings.

Production build 0.71.5 2024