MenuBlock BlockAccess changes missing required classes

Created on 8 May 2024, 8 months ago

Problem/Motivation

The recent release 8.x-1.11 included a change to the MenuBlock class to add a BlockAccess function using the AccountInterface and AccessResult classes, but neither of those classes were included. This is causing a PHP fatal error during our test runs.

Fatal error: Could not check compatibility between Drupal\menu_block\Plugin\Block\MenuBlock::blockAccess(Drupal\menu_block\Plugin\Block\AccountInterface $account) and Drupal\Core\Block\BlockBase::blockAccess(Drupal\Core\Session\AccountInterface $account), because class Drupal\menu_block\Plugin\Block\AccountInterface is not available in docroot/modules/contrib/menu_block/src/Plugin/Block/MenuBlock.php on line 429

Steps to reproduce

Upgrade to 8.x-1.11

Proposed resolution

Add the missing classes

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: works as designed

Version

1.11

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States joegl

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

Comments & Activities

Production build 0.71.5 2024