Skip to content

Commit

Permalink
Merge pull request #120 from francoispluchino/clean-bin
Browse files Browse the repository at this point in the history
Clean the bin file
  • Loading branch information
DonCallisto authored Dec 11, 2017
2 parents b1cadad + 4b10c7d commit a28f943
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions fastest
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,33 @@
<?php

declare(ticks = 1);
$files = array(
__DIR__ . '/vendor/autoload.php',
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/../../vendor/autoload.php',
__DIR__ . '/../../../vendor/autoload.php'
);

$found = false;
if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}

foreach ($files as $file) {
foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
if (file_exists($file)) {
require $file;
$found = true;
define('FASTEST_COMPOSER_INSTALL', $file);

break;
}
}

if (!$found) {
die(
'You need to set up the project dependencies using the following commands:' . PHP_EOL .
'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
'php composer.phar install' . PHP_EOL
);
}
unset($file);

if (!defined('FASTEST_COMPOSER_INSTALL')) {
fwrite(
STDERR,
'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL .
' composer install' . PHP_EOL . PHP_EOL .
'You can learn all about Composer on https://getcomposer.org/.' . PHP_EOL
);

use Liuggio\Fastest\Application;
use Liuggio\Fastest\AppParametersFromEnv;
die(1);
}

require FASTEST_COMPOSER_INSTALL;

$application = new Application();
$application = new \Liuggio\Fastest\Application();
$application->run();

0 comments on commit a28f943

Please sign in to comment.