Change record status: 
Project: 
Introduced in branch: 
8.0.x
Introduced in version: 
8.0.0-BETA11
Description: 
  1. API break: MenuLinkTreeElement::access must now be NULL or an AccessResultInterface object, it used to be either NULL or a boolean.
  2. API addition: MenuParentFormSelectorInterface::getParentSelectOptions() has gained a new optional parameter.
  3. API addition: Element::isEmpty()

Practically

  1. DefaultMenuLinkTreeManipulators::checkAccess() now sets an AccessResult object (which implements both AccessResultInterface and CacheableDependencyInterface). This ensures that the final menu tree contains all the necessary cacheability metadata during rendering.
  2. MenuLinkTree::build() now tracks the cacheability metadata of both access results and the links it renders, and then applies that cacheability metadata to the the render array it returns. The cacheability of rendered URLs is taken care of in menu.html.twig, because MenuLinkTree::build() does not actually render URLs, the Twig template does. MenuLinkTree::build() just figures out *which* links to render.

This means that any code that was transforming a menu link tree, and included an access-checking menu link tree manipulator, and manually rendered (i.e. not using MenuLinkTree::build()) the end result, must now perform access checking in that manual rendering.

Similarly, if you had written any custom menu link tree manipulator that performed access checking, it must now no longer set booleans, but AccessResultInterface objects.

Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done