- extraneous, because the $entity parameter that's passed in should already be the desired translation
- confusing, because if the passed in $langcode is different from $entity->language()->id, it's not clear what the expected behavior should be
This issue is critical, because it is required by, which is required by , which is required by and other places where core or contrib needs to move a route to the new routing system but requires a node_access() check.
Remove the parameter. Require calling code to pass in the desired translation, rather than the original entity (or a random translation of it) and a separate
$langcode parameter removed from:
This therefore affects all implementations of the interfaces and hooks.
Beta phase evaluation
|Issue category||Task because nothing is actually broken.|
|Issue priority||Major because this affects the whole Entity Access API.|
|Prioritized changes||The main goal of this issue is reducing fragility by streamlining the Entity Access API and thus improving security by removing the possibility of writing ambiguous code.|
|Disruption||Disruptive for core, contributed and custom modules because it will require a BC break: the code will need to be adjusted to pass the proper entity translation object instead of specifying a language parameter.|
PASSED: [[SimpleTest]]: [PHP 5.5 MySQL] 117,222 pass(es). View
FAILED: [[SimpleTest]]: [PHP 5.5 MySQL] 115,609 pass(es), 427 fail(s), and 22 exception(s). View