Currently all my classes are in one folder and are under one namespace:
"psr-4": {
"RootNamespace\\": "lib/"
},
This is working well. As I'm adding more and more classes, I would like to put some logically related classes into deeper namespace level, but with the same root namespace. It should be something like this:
RootNamespace/Services (in 'lib/services' dir)
RootNamespace/Listeners (in 'lib/listeners' dir)
I suppose so that I don't need to change anything in my composer.json ps-4 autoload definition, but it's not working anymore.
How autoload definition should look like to achieve what I want to?
As I tested, solution below is not a good since, declarations seems to be overwritten
"psr-4": {
"RootNamespace\\": "lib/",
"RootNamespace\\Services\\": "lib/services/",
"RootNamespace\\Listeners\\": "lib/listeners/"
},