20 lines
515 B
PHP
Executable File
20 lines
515 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
use App\Kernel;
|
|
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
|
|
|
if (!in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
|
|
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.\PHP_SAPI.' SAPI'.\PHP_EOL;
|
|
}
|
|
|
|
set_time_limit(0);
|
|
|
|
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
|
|
|
return function (array $context) {
|
|
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
|
|
|
return new Application($kernel);
|
|
};
|