- Issue created by @acbramley
- π¦πΊAustralia mstrelan
For completeness, if anyone is wondering what happens to modules that may have already updated to the new method signature. The answer is nothing, there is no harm returning void from a subclass if the parent has no return type. https://3v4l.org/B8MS6
- πΊπΈUnited States smustgrave
Out of my own curiosity how would we go about adding this?
- π¦πΊAustralia mstrelan
I think base classes are similar to interfaces, so see π Enable existing interfaces to add return type hints with a deprecation message for implementors Active
The 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.
- πΊπΈUnited States xjm
Good catch, thanks @acbramley and @mstrelan!
I would ask if we should have a followup to add it back, but since this is a specific implementation of a larger API, it should be handled in our meta issues to add these typehints in a major version.
Committed to both 11.x and 11.2.x (separately, since it requires an updated baseline), as a hotfix for an unintentional BC break. It's also worth mentioning in the 11.2.3 release notes that we've resolved this regression.
Crossposted with the bot. No, bot. Bad bot.
- πΊπΈUnited States xjm
Fixing credit for me as the committer, which the bot ate.