My component is using Joomla Categories and I'm using the following code to fetch a category:
$component = Joomla\CMS\Factory::getApplication()->bootComponent('com_khub');
$category = $component->getCategory(['published' => 0])->get($catid);
Joomla is complaining that class Khub\Component\Khub\Site\Service\Category
does not exists (at JROOT/libraries/src/Categories/CategoryFactory.php:65).
Of course this works OK with "com_content" and "com_banners" and I've tried to understand where and how those components register Joomla\Component\Content\Site\Service\Category
and Joomla\Component\Banners\Site\Service\Category
respectively, but with no success (JPATH_COMPONENT/services/provider.php contents are pretty much similar to what I have for my own component),
What am I missing?
Many thanks.