Chris R - 1 year ago 87
PHP Question

I have been looking around the net with no luck on this issue. I am using composer's autoload with this code in my

composer.json
:

"autoload": {
"psr-0": {"AppName": "src/"}
}


But I need to autoload at a higher level than the vendor folder.

Doing something like this does not work:

"autoload": {
"psr-0": {"AppName": "../src/"}
}


Does anyone know a fix or how I can do this?

<?php
$loader = require 'vendor/autoload.php';$loader->add('AppName', __DIR__.'/../src/');