From 2f83cf0dbda1ce1d15bec6a8dcc40ed19efb7870 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Sat, 9 Jun 2012 14:41:39 +0200 Subject: [PATCH] Cleaning up, removing iteration over parent directories as location of autoload.php can be determined eagerly --- bin/doctrine.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bin/doctrine.php b/bin/doctrine.php index 6cc40f978..81edf294f 100644 --- a/bin/doctrine.php +++ b/bin/doctrine.php @@ -17,14 +17,7 @@ * . */ -$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;