Problem/Motivation
While the interface itself https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Access%21... has a warning , the methods don't. See https://twitter.com/_klausi_/status/1183778372410888192
Proposed resolution
Add more documentation. Mark isForbidden and isNeutral as internal, they should never be called.
Remaining tasks
User interface changes
API changes
No hard changes, it's just doxygen.
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3087868_4.patch | 1.6 KB | ghost of drupal past |
Comments
Comment #2
ghost of drupal pastComment #3
wim leersThis is not true. Some access control logic may choose to return early if an intermediary result already is forbidden. That is a valid optimization strategy. If the logic whose execution can be avoided is very expensive (for example involving network I/O), that also is not premature optimization.
Comment #4
joachim commented'This' referred to the isForbidden() method in the paragraph that is being removed in this patch. If we're moving this paragraph to the AccessResultForbidden class, then 'this' no longer means the same thing.
Also, this sentence is too long and hard to understand.
Comment #5
ghost of drupal pastComment #12
smustgrave commentedThe documentation changes to AccessResultInterface in #5 makes sense to me. Not sure what more to test for that.
Comment #13
catchThis looks good. I added an extra 's' on 'return' (i.e. just because this returns FALSE) on commit.
Comment #17
catch