🐛 | Entity Information | Declaration of Drupal\entity_information\Routing\RouteSubscriber::getSubscribedEvents() must be compatible with Drupal\Core\Routing\RouteSubscriberBase::getSubscribedEvents(): array
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.