RSS Feed/News Inconsistent function return type hinting

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,170
Points
823

Reputation:

XF\Entity\UserUpgrade::setupApiResultData() has a return type of void, but XF\Mvc\Entity\Entity::setupApiResultData() doesn't and neither do seemingly most other entity classes. It means that any addons that extend XF\Entity\UserUpgrade::setupApiResultData() will break as it's arbitrarily had a return type added.

I can see that XF\Entity\UserUpgrade only had this function added in 2.3.0 Beta 4 so I presume it was an IDE autocomplete or something. It would be...

Read more

Continue reading...
 
Status
Not open for further replies.
Top