1
0
mirror of synced 2024-12-05 03:06:05 +03:00

Adding support for various composer autoload file locations, making composer optional

This commit is contained in:
Marco Pivetta 2012-06-09 10:48:58 +02:00
parent 9445502885
commit 8231fb2c68

View File

@ -17,11 +17,12 @@
* <http://www.doctrine-project.org>.
*/
if (!@include __DIR__ . '/../../../autoload.php') {
die(<<<'EOT'
This command can only be run when Doctrine is installed through Composer.
EOT
);
$previousDir = null;
$currentDir = __DIR__;
while ($previousDir !== $currentDir && !@include_once($currentDir . '/vendor/autoload.php')) {
$previousDir = $currentDir;
$currentDir = dirname($currentDir);
}
$configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php';