I had code to programmatically render a block.
$block = \Drupal\block\Entity\Block::load('bartik_search'); $block_content = \Drupal::entityManager() ->getViewBuilder('block') ->view($block); return array('#markup' => drupal_render($block_content)); After updating to Drupal 8.2.x, I get the following error:
Recoverable fatal error: Argument 1 passed to Drupal\block\BlockViewBuilder::view() must implement interface
How do I fix this error?