* @return string
*   A \Drupal\Core\Access\AccessInterface constant value.

Well, here are several things that is not entirely correct:

- There is no class called \Drupal\Core\Access\AccessInterface
- There are certainly no constants there.
- The function does not return a string at all, but rather a \Drupal\Core\Access\AccessResultInterface

Let's go ahead and fix that! :)

Patch coming up

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eiriksm created an issue. See original summary.

eiriksm’s picture

Status: Active » Needs review
FileSize
884 bytes
eiriksm’s picture

Just searched the codebase and found some more errors of the same type. Attached a patch with all of them.

idebr’s picture

Title: Wrong type return type in NodeAddAccessCheck::access » Wrong return type in several access_check service docblocks
Status: Needs review » Reviewed & tested by the community

Applied the patch in #3 locally and manually checked all services tagged as access_check to confirm the return type in the docblock is now correct throughout Drupal Core.

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed 4907fa7 and pushed to 8.8.x. Thanks!

  • larowlan committed 4907fa7 on 8.8.x
    Issue #3075404 by eiriksm: Wrong return type in several access_check...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.