XF 2.3 Unable to extend Repository classes

Dr.XGB

Member
Hello!

I'm migrating my addons to XF 2.3 and I ran into a problem when exntending some Repository classes.
The new version now uses a better naming convention to its classes (and that's great) such as \XF\Repository\Thread now is \XF\Repository\ThreadRepository, for example.

After setting my addon's extended classes to this convention, some repositories don't recognise the extension and so PHP throws an exception. This problem is only occouring with repositories. The rest such as controllers, finders, services and handlers are working perfectly well.

I don't know if the problem is a typo, or a problem with XenForo itself, or even a problem during the upgrade.
So I came here for help to find out how I can solve this problem.

Here are the screenshots inside the spoilers for you to understand better:



1722728942508.webp
1722729127714.webp
1722729533038.webp
1722729429947.webp
1722729192584.webp
 
Nice! It worked! 😃
It makes sense because the \XF::repository() takes the original class. So the extension is applied following the addons.

This thread may be closed. The problem was solved.
Thanks for the help!
 
Back
Top Bottom