Skip to content

Commit

Permalink
Fix feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Feb 27, 2012
1 parent bd6c85e commit 31031ae
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions app/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@

if (!$loader = include __DIR__.'/../vendor/.composer/autoload.php') {
$nl = PHP_SAPI === 'cli' ? PHP_EOL : '<br />';
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);
echo "$nl$nl";
if (is_writable(dirname(__DIR__))) {
file_put_contents(dirname(__DIR__).'/composer.phar', file_get_contents('http://getcomposer.org/composer.phar'));
die("You must set up the project dependencies.$nl".
"Composer has been downloaded.$nl".
"Run the following command in ".dirname(__DIR__).":$nl$nl".
"php composer.phar install$nl");
}
die("You must set up the project dependencies.$nl".
"Run the following commands in ".dirname(__DIR__).":$nl$nl".
"wget http://getcomposer.org/composer.phar$nl".
"php composer.phar install$nl");
}

use Doctrine\Common\Annotations\AnnotationRegistry;
Expand Down Expand Up @@ -32,4 +41,4 @@
// Swiftmailer needs a special autoloader to allow
// the lazy loading of the init file (which is expensive)
require_once __DIR__.'/../vendor/swiftmailer/swiftmailer/lib/classes/Swift.php';
Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/lib/swift_init.php');
Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/swiftmailer/lib/swift_init.php');

0 comments on commit 31031ae

Please sign in to comment.