From 768bedc16409f27010b3d7de991c593ec31cef58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Chy=C5=82ek?= Date: Thu, 15 Mar 2012 00:57:58 +0100 Subject: [PATCH 1/3] Fix xdebug display errors in autoload --- bin/compile | 6 +++++- bin/composer | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/compile b/bin/compile index bd8426693..e4c1c9eae 100755 --- a/bin/compile +++ b/bin/compile @@ -1,7 +1,11 @@ #!/usr/bin/env php Date: Thu, 15 Mar 2012 01:51:54 +0100 Subject: [PATCH 2/3] Add file_exists in bootstrap.php --- tests/bootstrap.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 02bd0e169..39c661936 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -10,7 +10,15 @@ * file that was distributed with this source code. */ -if ((!$loader = @include __DIR__.'/../../../.composer/autoload.php') && (!$loader = @include __DIR__.'/../vendor/.composer/autoload.php')) { +function autoload($file) { + if (file_exists($file)) { + return include $file; + } else { + return false; + } +} + +if ((!$loader = autoload(__DIR__.'/../../../.composer/autoload.php')) && (!$loader = autoload(__DIR__.'/../vendor/.composer/autoload.php'))) { die('You must set up the project dependencies, run the following commands:'.PHP_EOL. 'curl -s http://getcomposer.org/installer | php'.PHP_EOL. 'php composer.phar install'.PHP_EOL); From 0e0b5ac222f375e06a95dcf7a4c5fbf023541087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Chy=C5=82ek?= Date: Thu, 15 Mar 2012 11:36:40 +0100 Subject: [PATCH 3/3] chache to return (file_exists() && include ); --- bin/compile | 2 +- bin/composer | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/compile b/bin/compile index e4c1c9eae..589db50d1 100755 --- a/bin/compile +++ b/bin/compile @@ -2,7 +2,7 @@