RSS Feed/News XF\Mvc\Entity\Manager\getFinder does not reliably return the same type depending on class extensions

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,699
Points
823

Reputation:

XenForo's dynamically creates finders of a given base-type if they are extended or otherwise will return a \XF\Mvc\Entity\Finder instance.

The problem is when return and parameter arguments are narrower than the \XF\Mvc\Entity\Finder and will cause a type error violation.
  • XenForo does not define XF\Finder\Warning
  • Add-on A extended XF\Finder\Warning
  • Add-on B has a return type hint of XF\Finder\Warning
  • Add-on...

Read more

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