New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return Types for ITitledObject::getLink()
and ILinkableObject::getLink()
#5157
Conversation
Can you please further split this into 2 commits each:
|
@TimWolla I just splitted the commits. Is there any deep sense behind that separation? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Can you drop the annotated PHPDoc line and slightly reword the commit messages when you are rebasing anyway? “Return Value Type” misleadingly parses as “Return (Value Type)” instead of “(Value Value) Type” for me.
Let me suggest the following prasing:
- Add proper
string
return type to implementations ofFoo::bar()
- Add proper
string
return type toFoo::bar()
Generally it's considered good commit hygiene to make commits as small and self-contained as possible. In this specific case it's logically two different types of change and by splitting them into different commits, they can be independently reverted if the need arises. If it turns out that the break from the explicit type in the interface is too bad, that one can be reverted without losing the explicit types in the implementing classes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thank you. I'll handle updating the return types in the other packages (including the open sourced ones).
…:getLink() These are required since #5157, because the actual event classes implement both this interface and the ITitledObject/ILinkableObject interfaces, requiring both interfaces to be compatible. This breaks the `null` return value for `getLink()`, but implementing classes can just implement the compatibility link to NotificationListPage themselves.
This prevents issues in case one would return
null
or other types.