Skip to content

Commit

Permalink
Clean the bin file
Browse files Browse the repository at this point in the history
  • Loading branch information
francoispluchino committed Dec 11, 2017
1 parent b1cadad commit 4b10c7d
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 4b10c7d

Please sign in to comment.