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

As a coding standard, all special attributes on the request object should be prefixed with an underscore.

Thus, if a module or service adds to the request attributes directly, the key name should start with "_".

This will avoid conflicts with values populated based on path placeholders (a.k.a. slugs) like node from the /node/{node} path pattern.

Some of the conversions done in #2052389: All elements added to the Request attributes should have a _ prepended unless they come from the path:

  • $request->attributes->get('system_path') to $request->attributes->get('_system_path')
  • $request->attributes->get('drupal_menu_item') to $request->attributes->get('_drupal_menu_item')
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

Comments

Define "special"

I think we can simply follow the guideline that's part of the issue title: "All elements added to the Request attributes should have a _ prepended unless they come from the path"

Started on a doc page: https://drupal.org/node/2084027

---
Work: Acquia