Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding support for various composer autoload file locations, making c…

…omposer optional
  • Loading branch information...
commit 8231fb2c68392b737c8f508bc9b594de6064b83b 1 parent 9445502
@Ocramius Ocramius authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 bin/doctrine.php
View
11 bin/doctrine.php
@@ -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';
Please sign in to comment.
Something went wrong with that request. Please try again.