How to use Composer to autoload classes from outside the vendor?
The src directory would be in your project root. Its on the same level as vendor directory is. If you define “autoload”: { “psr-4”: { “DG\\Munchkin\\”: “src/DG/Munch/” } } this will not load classes from /var/www/html/xxx/vendor/yyy/src/DG/Munch, like you stated. Because your project structure is: /var/www/html/ +- /xxx (project) – composer.json +- /src +- DG +- … Read more