When 'auto-import' components, one should carefully read the Documentation here.
The paragraph that say
lib/api/client resolves to
API::Client class with identifier 'api.client'.
Could be better illustrated with a folder structure that show a
Also it seems to me that on the last code of the
the class should be in the
as if someone would like to use it from somewhere else, it would be registered as
but when instantiating the
component.instance it won't find the proper
Persistent::UserRepo constant defined.
I struggled a long moment, before finding why an 'auto-import' class, was reporting something like 'constant Api not found
for a component in a/lib/api/client.rb' under key
'api.client' until I wrapped the
Client class into the proper
Api module as the directory structure dictate it.
loader should try harder