Permalink
Browse files

Cleaning up, removing iteration over parent directories as location o…

…f autoload.php can be determined eagerly
  • Loading branch information...
Ocramius committed Jun 9, 2012
1 parent 8231fb2 commit 2f83cf0dbda1ce1d15bec6a8dcc40ed19efb7870
Showing with 1 addition and 8 deletions.
  1. +1 −8 bin/doctrine.php
View
@@ -17,14 +17,7 @@
* <http://www.doctrine-project.org>.
*/
-$previousDir = null;
-$currentDir = __DIR__;
-
-while ($previousDir !== $currentDir && !@include_once($currentDir . '/vendor/autoload.php')) {
- $previousDir = $currentDir;
- $currentDir = dirname($currentDir);
-}
-
+(@include_once __DIR__ . '/../vendor/autoload.php') || @include_once __DIR__ . '/../../../autoload.php';
$configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php';
$helperSet = null;

0 comments on commit 2f83cf0

Please sign in to comment.