Closed (fixed)
Project:
Open Social
Version:
8.x-4.x-dev
Component:
Activity/Notifications
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2019 at 13:44 UTC
Updated:
30 Apr 2019 at 10:19 UTC
Jump to comment: Most recent
Comments
Comment #2
bramtenhove commentedFind the pull request here: https://github.com/goalgorilla/open_social/pull/1291
Comment #3
jaapjan commentedComment #4
kingdutchI'm moving this back to needs work. We should encourage the use of Interfaces (this is exactly what they're for) instead of checking whether the method exists.
Performance wise the difference is negligible (instanceof is even slightly faster). However,
instanceofmore clearly communicates intent because we're looking to use thegetOwnerfunction in the way that it's defined in that interface. When usingmethod_exists, if someone were to implementgetOwnerbut not return an instance ofUserInterfacethen our code would still fall apart.Comment #5
kingdutchhttps://github.com/goalgorilla/open_social/pull/1299
Comment #8
jaapjan commentedKingdutch, like discussed let's move the last PR to 5.0 and to a separate issue.