\Drupal\Core\Extension\ModuleHandlerInterface::invoke() and \Drupal\Core\Extension\ModuleHandlerInterface::invokeAll() document that their second arguments must be arrays, but there is no type hinting. Lack of this caused #2170989: Migrate provides invalid arguments when invoking hooks to remain unnoticed, for instance.

CommentFileSizeAuthor
#6 drupal_2170991_5.patch3.03 KBXano
#1 drupal_2170991_1.patch2.05 KBXano
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xano’s picture

Assigned: Xano » Unassigned
Status: Active » Needs review
FileSize
2.05 KB
Xano’s picture

For the record: this depends on #2170989: Migrate provides invalid arguments when invoking hooks being fixed first.

Xano’s picture

Status: Needs review » Needs work

The last submitted patch, 1: drupal_2170991_1.patch, failed testing.

The last submitted patch, 1: drupal_2170991_1.patch, failed testing.

Xano’s picture

Status: Needs work » Needs review
FileSize
3.03 KB

Fixed some of the failures.

Xano’s picture

Title: Type hint array arguments in ModuleHandlerInterface » Migrate provides invalid arguments when invoking hooks/type hint array arguments in ModuleHandlerInterface
chx’s picture

Status: Needs review » Reviewed & tested by the community

Good catch.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Since this is just changing type-hinting and fixing a typo, I don't think we need tests for this.

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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