- Status changed to Closed: works as designed
over 1 year ago 11:41am 16 August 2023 This can be closed. I figured out the problem. It was a patch adding the extra function. Sorry.
PHP Fatal error: Declaration of Drupal\\menu_item_extras\\Routing\\RouteSubscriber::getSubscribedEvents() must be compatible with Drupal\\Core\\Routing\\RouteSubscriberBase::getSubscribedEvents(): array
This is the error I am recieving on a Drupal 10.0.10 website. The fix seems to be to add the : array
to the end of the getSubscribedEvents()
function. The issue with adding it is that the function isnt in the source code. This function only shows up when the module is installed it seems. I am not sure where this code is being added/generated from.
See Routing code for the source.
Add "drupal/menu_item_extras": "^3.0",
to your composer.json file. Run drush updb -y
or similar.
Should see the above error. This could also be a red herring to something else though.
Add the : array
to the end of the getSubscribedEvents()
function.
See similar error 🐛 Commerce shipping EventSubscriber\RouteSubscriber::getSubscribedEvents() is not compatible with Drupal 10 RouteSubscriberBase::getSubscribedEvents() Fixed as an example.
Closed: works as designed
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This can be closed. I figured out the problem. It was a patch adding the extra function. Sorry.