Created
June 18, 2016 17:10
-
-
Save schmiddim/bb610730a3e23178e34869de4068e055 to your computer and use it in GitHub Desktop.
initialize composer
Raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Requiring composer autoloader (local or global) | |
foreach ([__DIR__ . '/../../autoload.php', __DIR__ . '/vendor/autoload.php'] as $file) { | |
if (file_exists($file)) { | |
define('COMPOSER_AUTOLOADER', $file); | |
break; | |
} | |
} | |
if (!defined('COMPOSER_AUTOLOADER')) { | |
die( | |
'You need to set up the project dependencies using the following commands:' . PHP_EOL . | |
'php -r "readfile(\'https://getcomposer.org/installer\');" | php' . PHP_EOL . | |
'php composer.phar install' . PHP_EOL | |
); | |
} | |
require COMPOSER_AUTOLOADER; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment