META ISSUE
motivation
We removed a lot of $op params, but we left some in.
proposed resolution
We should remove them
- (#1 says done) hook_locale: http://api.drupal.org/api/drupal/modules--locale--locale.api.php/functio...
- hook_node_access: #1281938: Remove $op param from hook_node_access http://api.drupal.org/api/drupal/modules--node--node.api.php/function/ho...
- hook_node_grants: #3352043: Rename $op operation in hook_node_grants[_alter]() and node_access_grants to $operation http://api.drupal.org/api/drupal/modules--node--node.api.php/function/ho...
- hook_node_grants_alter: #3352043: Rename $op operation in hook_node_grants[_alter]() and node_access_grants to $operation http://api.drupal.org/api/drupal/modules--node--node.api.php/function/ho... #1469758: Define $user in hook_node_grants_alter
- hook_openid: #765984: Convert hook_openid('request', ...) to hook_openid_request_alter() http://api.drupal.org/api/drupal/modules--openid--openid.api.php/functio...
Remaining tasks
- document a grep (or some way) to check for any remaining
- find out if other existing issues are taking care of some
- in general evaluate if this issue is still relevant
Comments
Comment #1
karschsp commented#1281938: Remove $op param from hook_node_access
#765984: Convert hook_openid('request', ...) to hook_openid_request_alter()
#611772: Node access hooks don't quite make sense...
It looks like hook_locale has already been removed.
Comment #2
chertzoghook_node_grants and hook_node_grants_alter are being addressed here: #1469758: Define $user in hook_node_grants_alter
Comment #3
yesct commentedgetting a first look at if this is still relevant, put issues in the summary.
Comment #16
andypostComment #17
catch#1281938: Remove $op param from hook_node_access is won't fix now, ten years after that was decided in the issue.
hook_node_grants() still has an $op parameter, so needs an issue creating for it.
Comment #18
andypostThere's
function _user_mail_notify($op, AccountInterface $account)which needs workLooking at
node_query_node_access_alter()I see$query->getMetaData('op')which means API change and should use follow-up to rename metadata key with BCupdated IS a bit
Comment #19
andypostThere's a bit more
And
Comment #20
andypostFiled new child - #3353545: Rename $op to $operation arguments
Comment #21
andypostThere only one child left and change record looks unrelated
Comment #23
andypostFiled new child #3380781: Rename $op with BC usage in update.php
Comment #24
ankitsingh0188Please review the child issue https://www.drupal.org/project/drupal/issues/3380781
Comment #25
smustgrave commentedThis is a meta with open issues