Problem/Motivation
The Drupal\block\BlockInterface::access() method (and it's implementation in Drupal\block\BlockBase)
does not allow to check access for a specific account, but just for the global user.
This may prevent BlockAccessController from working correctly, if access for an account is checked.
I stumbled over this in the refactoring of the AccessControllerInterface in #1947892: Improve DX with EntityAccessControllerInterface
Proposed resolution
Extend ::access() method (see "API changes")
Remaining tasks
Extend interface
Alter implementations
Update BlockAccessController ( #1947892: Improve DX with EntityAccessControllerInterface )
Write a test for BlockBase::access() with and without passed account.
User interface changes
None
API changes
Change BlockInterface::access() to
<?php
public function access(Drupal\user\Plugin\Core\Entity\User $user = NULL);
?>