Output extension class in .phpstrom.meta.php

Kirby

Well-known member
When generating .phpstrom.meta.php, XenForo outputs the root class (eg. XF\Entity\Post::class).

I think it would be useful if the actual extension class (eg. SomeVendor\SomeAddOn\XF\Entity\Post::class) was used instead.

Ideally this could even be (asynchrounsly) updated automatically when class extensions are mutated and development mode is active.
 
Upvote 1
I have a different perspective. XenForo's current approach of outputting the root class in .phpstrom.meta.php makes sense because it provides a clear and unambiguous reference point for IDEs. Using the actual extension class might introduce complexity, especially in cases where multiple extensions could potentially modify the same class. While automatic updates could be helpful, they might also lead to unexpected changes during development, potentially causing issues. So, sticking to the root class seems more straightforward and less error-prone.
 
Top Bottom