Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

The access manager got a new method which allows an access check given a route name and parameters.

Instead of using the path and generating a fake request, the route name and parameters should be used instead.

In addition, a path-based check depends on having the system path, so in the event you have only the aliased path, it would need to be processed by the inbound path processor.

Before

  $request = Request::create('/' . $href);
  $request->attributes->set('_system_path', $href);
  $request->attributes->add(Drupal::service('router.dynamic')->matchRequest($request));

  return Drupal::service('access_manager')->check($route, $request);

After

  Drupal::service('access_manager')->checkNamedRoute('user_admin_permission', array('role_id' => 'authenticated'));
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