mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
29 lines
722 B
PHP
Executable File
29 lines
722 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
use GitList\Kernel;
|
|
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
|
use Symfony\Component\Console\Input\ArgvInput;
|
|
use Symfony\Component\Debug\Debug;
|
|
use Symfony\Component\Dotenv\Dotenv;
|
|
|
|
set_time_limit(0);
|
|
|
|
require __DIR__.'/../vendor/autoload.php';
|
|
|
|
$input = new ArgvInput();
|
|
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true);
|
|
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true);
|
|
|
|
if ($debug) {
|
|
umask(0000);
|
|
|
|
if (class_exists(Debug::class)) {
|
|
Debug::enable();
|
|
}
|
|
}
|
|
|
|
$kernel = new Kernel($env, $debug);
|
|
$application = new Application($kernel);
|
|
$application->run($input);
|