There is no namespace part "my" in your definitions.
namespace user;
class User {...}
This class is named \user\User
, not \my\user\User
.
The same applies to \world\World
.
Consequently the namespace definition in Composer is wrong. You'd need two definitions for both user
and world
, both in the same directory:
{
"autoload": {
"psr-0": {
"user\\": "src/app",
"world\\": "src/app"
}
}
}