Skip to content

Instantly share code, notes, and snippets.

@schmiddim
Created June 18, 2016 17:10
Show Gist options
  • Save schmiddim/bb610730a3e23178e34869de4068e055 to your computer and use it in GitHub Desktop.
Save schmiddim/bb610730a3e23178e34869de4068e055 to your computer and use it in GitHub Desktop.
initialize composer Raw
<?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