Merge pull request #35 from hakito/master

Samples missing vendor folder in error because it cannot locate the autoload.php
This commit is contained in:
Jay
2014-09-24 14:53:01 -05:00

View File

@@ -1,17 +1,20 @@
<?php
/*
* Sample bootstrap file.
*/
// Include the composer autoloader
if(!file_exists(__DIR__ .'/vendor/autoload.php')) {
echo "The 'vendor' folder is missing. You must run 'composer update --no-dev' to resolve application dependencies.\nPlease see the README for more information.\n";
exit(1);
$composerAutoload = dirname(dirname(dirname(__DIR__))) . '/autoload.php';
if (!file_exists($composerAutoload))
{
$composerAutoload = __DIR__ .'/vendor/autoload.php';
if(!file_exists(__DIR__ .'/vendor/autoload.php')) {
echo "The 'vendor' folder is missing. You must run 'composer update' to resolve application dependencies.\nPlease see the README for more information.\n";
exit(1);
}
}
require __DIR__ . '/vendor/autoload.php';
require $composerAutoload;
require __DIR__ . '/common.php';
use PayPal\Rest\ApiContext;