Fixed Various AbstractHandler classes are missing @template based type hints

Xon

Well-known member
Affected version
2.3.6
When extending a Tag handler, I noticed a bunch of abstractHandler classes are missing @template T of Entity style hints

XF\Attachment\AbstractHandler
XF\ContentVote\Event\AbstractHandler
XF\ModeratorLog\AbstractHandler
XF\Poll\AbstractHandler
XF\Tag\AbstractHandler

git patch file to implement this is attached
 

Attachments

Last edited:
Thanks for the patch, we'll get these in the next release. As a general note, our work towards improving typing is a gradual and ongoing process so, even though omissions aren't exactly deliberate, it's a bit of a not letting perfect be the enemy of good/better situation.
 
php's gradual typing story is one of the better ones, and I do understand that adding typing to an code-base as large as XF is quite involved.
 
The git patch has a typo leftover from editing:
Code:
    /**
     * @param T|C| $container
     * @param array  $extraParams
     * @return string
     */

That should be @param T $container not T|C|
 
Back
Top Bottom