Problem/Motivation
See #3483037: [META] Add return types to hook implementations
Steps to reproduce
Find all occurrences in the baseline:
grep "Function .*_entity_type_alter\\\\.* has no return type specified" core/.phpstan-baseline.php
Proposed resolution
Add : void to each of them.
This nifty command will find and replace all occurrences that come shortly after "Implements hook_entity_type_alter()":
find . -type f -exec sed -i '/Implements hook_entity_type_alter()/,/\(function .*_entity_type_alter(.*)\) *{/!b;/\(function .*_entity_type_alter(.*)\) *{/s/\(function .*_entity_type_alter(.*)\) *{/\1: void {/' {} +
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Comments
Comment #3
mstrelan commentedComment #4
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #5
mstrelan commentedRebased and rebaselined
Comment #6
smustgrave commentedRebase seems good to me
Comment #7
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #8
mstrelan commentedRe-rolled
Comment #9
smustgrave commentedRebase seems good
Comment #12
catchCommitted/pushed to 11.x and cherry-picked to 11.1.x, thanks!