Commit 94e5e554 authored by Guilherme Blanco's avatar Guilherme Blanco

Merge pull request #770 from doctrine/composer-autoload-dev

Moved Doctrine\Tests namespace to composer autoload-dev.
parents 32fae862 c5e5d592
......@@ -26,6 +26,9 @@
"autoload": {
"psr-0": { "Doctrine\\DBAL\\": "lib/" }
},
"autoload-dev": {
"psr-0": { "Doctrine\\Tests\\": "tests/" }
},
"extra": {
"branch-alias": {
"dev-master": "2.6.x-dev"
......
......@@ -8,14 +8,10 @@ date_default_timezone_set('UTC');
if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) {
// dependencies were installed via composer - this is the main project
$classLoader = require __DIR__ . '/../../../vendor/autoload.php';
require __DIR__ . '/../../../vendor/autoload.php';
} elseif (file_exists(__DIR__ . '/../../../../../autoload.php')) {
// installed as a dependency in `vendor`
$classLoader = require __DIR__ . '/../../../../../autoload.php';
require __DIR__ . '/../../../../../autoload.php';
} else {
throw new Exception('Can\'t find autoload.php. Did you install dependencies via Composer?');
}
/* @var $classLoader \Composer\Autoload\ClassLoader */
$classLoader->add('Doctrine\\Tests\\', __DIR__ . '/../../');
unset($classLoader);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment