Adding support for various composer autoload file locations, making composer optional
This commit is contained in:
parent
9445502885
commit
8231fb2c68
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user