Deprecate access callback in HandlerBase

Created on 6 August 2025, about 2 months ago

Problem/Motivation

Currently the access callback key requires the procedural function in a .module file to work. We can convert to CallbackResolver, however as @berdir points out: https://git.drupalcode.org/project/drupal/-/merge_requests/12795#note_56...

I'm wondering if we want to deprecate this completely.
There are no usages of this in core. The very widely used EntityField field plugin doesn't call the parent, so 90% of fields would actually not support it.
There are several handler subclasses for it, which makes much more sense than a stray callback.
I found one case of such an access callback in a views.inc file, and that's on a custom handler that could easily override the access() method instead: https://git.drupalcode.org/project/opigno_calendar/-/blob/3.x/opigno_cal...
Seems like a such a weird concept, likely a leftover of D7 hook_menu() where it passed this through to that.

Steps to reproduce

Proposed resolution

Add CR
Add deprecation

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

views.module

Created by

πŸ‡ΊπŸ‡ΈUnited States nicxvan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024