We shouldn't typehint classes like this. Makes testing harder.

Patch changes it to typehint the interface.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, dont-typehint-classes.patch, failed testing.

msonnabaum’s picture

Status: Needs work » Needs review
FileSize
1.66 KB
katbailey’s picture

Status: Needs review » Reviewed & tested by the community

Yar.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

This looks consistent with what I've seen in entity API, where we pass an interface around rather than a class to allow mocking or whatever, as long as it conforms to the interface. So makes sense to me.

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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